Mailing List Archive

[Bug 3452] New: compiler warnings in VC++ (Windows) spamc build
http://bugzilla.spamassassin.org/show_bug.cgi?id=3452

Summary: compiler warnings in VC++ (Windows) spamc build
Product: Spamassassin
Version: SVN Trunk (Latest Devel Version)
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: minor
Priority: P5
Component: Building & Packaging
AssignedTo: spamassassin-dev@incubator.apache.org
ReportedBy: sidney@sidney.com


Since we went to -Wall in gcc, I'm putting this in as a bug so we can fix the
warnings and do the same in the VC++ build of spamc.

Here is what I get when I add a /W4 switch to the VC++ 5.0 options in spamc
(I'll attach the patch for spamc/comfig.pl that adds the switch)

Microsoft (R) Program Maintenance Utility Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.

cl /DWIN32 /W4 spamc.c replace\getopt.c libspamc.c utils.c ws2_32.lib

Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8168 for 80x86
Copyright (C) Microsoft Corp 1984-1998. All rights reserved.

spamc.c
C:\PROGRA~1\MICROS~2\VC98\INCLUDE\rpcasync.h(45) : warning C4115: '_RPC_ASYNC_ST
ATE' : named type definition in parentheses
spamc.c(240) : warning C4244: '=' : conversion from 'int ' to 'unsigned short ',
possible loss of data
getopt.c
replace\getopt.c(36) : warning C4100: 'optstr' : unreferenced formal parameter
replace\getopt.c(36) : warning C4100: 'argc' : unreferenced formal parameter
libspamc.c
C:\PROGRA~1\MICROS~2\VC98\INCLUDE\rpcasync.h(45) : warning C4115: '_RPC_ASYNC_ST
ATE' : named type definition in parentheses
libspamc.c(283) : warning C4100: 'sockptr' : unreferenced formal parameter
libspamc.c(283) : warning C4100: 'tp' : unreferenced formal parameter
libspamc.c(856) : warning C4018: '>=' : signed/unsigned mismatch
libspamc.c(868) : warning C4018: '>=' : signed/unsigned mismatch
libspamc.c(947) : warning C4127: conditional expression is constant
libspamc.c(1308) : warning C4013: 'write' undefined; assuming extern returning i
nt
libspamc.c(1290) : warning C4100: 'level' : unreferenced formal parameter
utils.c
C:\PROGRA~1\MICROS~2\VC98\INCLUDE\rpcasync.h(45) : warning C4115: '_RPC_ASYNC_ST
ATE' : named type definition in parentheses
utils.c(75) : warning C4013: 'read' undefined; assuming extern returning int
utils.c(212) : warning C4013: 'write' undefined; assuming extern returning int
utils.c(216) : warning C4057: 'function' : 'const char *' differs in indirection
to slightly different base types from 'const unsigned char *'
Generating Code...
replace\getopt.c(107) : warning C4706: assignment within conditional expression



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.