[ros-bugs] [Bug 3578] Fix buildno const warnings

ReactOS.Bugzilla at www.reactos.org ReactOS.Bugzilla at www.reactos.org
Sun Jul 27 13:54:00 CEST 2008


http://www.reactos.org/bugzilla/show_bug.cgi?id=3578





--- Comment #2 from hto <hto at dev.null>  2008-07-27 13:53:58 CET ---
(In reply to comment #1)

> Current buildno doesn't emit a warning for me and BuildBot. 

I also see these (harmless) warnings when compiling with GCC 4.2.3 with
optimization.

tools/buildno/buildno.cpp:36: warning: deprecated conversion from string
constant to ‘char*’
tools/buildno/buildno.cpp: In function ‘int main(int, char**)’:
tools/buildno/buildno.cpp:361: warning: deprecated conversion from string
constant to ‘wchar_t*’

> Also I don't think making this variable "const" is correct.
> argv0 is set to argv[0] in main(), so it's not really a constant value.

argv0 is used only as an argument to fprintf (), and this function does not
modify its arguments. So this change is correct. const char * p is a pointer to
a constant char, while char * const p is a constant pointer to a char. It is
also always OK to assign char * to const char *.


-- 
Configure bugmail: http://www.reactos.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the Ros-bugs mailing list