To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=47866 Issue #:|47866 Summary:|[PATCH] Fix compilation warnings under VC++ 6.0 Component:|tools Version:|current Platform:|PC URL:| OS/Version:|Windows XP Status:|UNCONFIRMED Status whiteboard:| Keywords:| Resolution:| Issue type:|DEFECT Priority:|P3 Subcomponent:|dmake Assigned to:|hjs Reported by:|shay
------- Additional comments from [EMAIL PROTECTED] Thu Apr 21 02:08:31 -0700 2005 ------- When building the cws_src680_dmake43p01 version using MSVC++ 6.0 I get these compilation warnings: infer.c infer.c(419) : warning C4133: '!=' : incompatible types - from 'struct tcell *' to 'struct lcell *' sysintf.c win95\microsft\config.h(83) : warning C4005: 'CONST' : macro redefinition C:\PROGRA~1\MICROS~2\VC98\include\windef.h(138) : see previous definition of 'CONST' sysintf.c(366) : warning C4113: 'void (__cdecl *)()' differs in parameter lists from 'void (__cdecl *)(int )' sysintf.c(368) : warning C4113: 'void (__cdecl *)()' differs in parameter lists from 'void (__cdecl *)(int )' function.c function.c(424) : warning C4113: 'int (__cdecl *)()' differs in parameter lists from 'int (__cdecl *)(const void *,const void *)' function.c(462) : warning C4113: 'int (__cdecl *)()' differs in parameter lists from 'int (__cdecl *)(const void *,const void *)' The infer.c warning is caused by: mtcp != NIL(CELL) in which mtcp is a LINKPTR aka LINK* aka lcell*, but NIL(CELL) is a CELL* aka tcell*. The obvious fix would seem to be to change NIL(CELL) to NIL(LINK). The win95\microsft\config.h warning is caused by: /* MSC doesn't seem to care about CONST */ #define CONST It would appear that MSC *does* care about CONST now (it is defined in <windef.h>), so a solution is not to define CONST if it is already defined. The other sysintf.c warnings are caused by the declaration of "fn" (the second argument passed to signal()) as: void (*fn)(); The MSDN documentation gives signal()'s signature as: void ( *signal( int sig, void (__cdecl *func) ( int sig [, int subcode ] )) ) ( int sig ); so "fn" should be declared as: void (*fn)(int); This should work on UNIX too (although I can't test it) because the Single UNIX Specification Version 3 at http://www.unix.org/ also has: void (*signal(int sig, void (*func)(int)))(int); for the signal() signature. Finally, the function.c warnings are caused by two calls to: qsort( tokens, i, sizeof(char *), _mystrcmp ); in which _mystrcmp() is declared as: static int _mystrcmp ANSI((const PVOID, const PVOID)); The ANSI() macro seems to be the problem, replacing the (const PVOID, const PVOID) with just (). Removing the use of the ANSI() macro fixes the warnings for me, but I confess that I have no idea whether this is correct or not. A patch containing these changes follows. --------------------------------------------------------------------- Please do not reply to this automatically generated notification from Issue Tracker. Please log onto the website and enter your comments. http://qa.openoffice.org/issue_handling/project_issues.html#notification --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]