Chris Sutcliffe wrote:
On 8/15/07, Chris Sutcliffe wrote: > > Adding (char *) casts for things that are already character strings? > > Isn't this a problem in gcc? > > GCC complains that const char*'s is being passed as a char*'s (because > it's a contant string being passed in the quotes), so I re-cast it as > a (char*) to get rid of the warnings. > > Basically because, for example, searchpath(char *) is defined to take > a char* argument and "gvim.bat" is considered a constant char*, there > is a mismatch in argument types (which GCC 4 is a little more adamant > about, since I believe one of GCC 4's goals is to be more standards > compliant). Ah, of course. I often leave out the "const", because the added value is small and the hassle to get it right is not small. -- If Microsoft would build a car... ... The airbag system would ask "are you SURE?" before deploying. /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ download, build and distribute -- http://www.A-A-P.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
