wine/clang warnings

Austin English austinenglish at gmail.com
Tue May 15 15:20:49 CDT 2012


Howdy,

I tried Wine with LLVM/Clang from svn recently, thought others may
like some of the results. I've also ran the static analyzer.

For reference, this is with:
wine-1.5.4-61-g8327e6f, plus the following patch:
diff --git a/include/windef.h b/include/windef.h
index 9cf98e7..e95388a 100644
--- a/include/windef.h
+++ b/include/windef.h
@@ -53,7 +53,7 @@ extern "C" {
 #ifndef __stdcall
 # ifdef __i386__
 #  ifdef __GNUC__
-#   ifdef __APPLE__ /* Mac OS X uses a 16-byte aligned stack and not
a 4-byte one */
+#   if defined (__APPLE__) || defined (__clang__) /* Mac OS X uses a
16-byte aligned stack and not a 4-byte one */
 #    define __stdcall __attribute__((__stdcall__))
__attribute__((__force_align_arg_pointer__))
 #   else
 #    define __stdcall __attribute__((__stdcall__))

see http://wiki.winehq.org/Clang for more info. Wine was compiled using:
#!/bin/bash
export CC="clang"
export CXX="$CC"
export CFLAGS="-g -O0 -std=gnu89 -Wno-conversion -Wno-invalid-source-encoding"
./configure

-Wno-invalid-source-encoding, because clang does not like our encoding
of strings in winex11/keyboard.c. There are 851 warnings of:
clang -c -I. -I. -I../../include -I../../include  -D__WINESRC__
-D_REENTRANT -fPIC -Wall -pipe -fno-strict-aliasing
-Wdeclaration-after-statement -Wempty-body -Wignored-qualifiers
-Wstrict-prototypes -Wtype-limits -Wwrite-strings
-fno-omit-frame-pointer -Wpointer-arith -I/usr/include/freetype2    -g
-O0 -std=gnu89 -Wno-conversion  -o keyboard.o keyboard.c
keyboard.c:267:17: warning: illegal character encoding in string
literal [-Winvalid-source-encoding]
 "`","1!","2\"","3<A3>","4$","5%","6^","7&","8*","9(","0)","-_","=+",

The static analyzer found 2231 bugs (--disable-tests was used).

http://www.sendspace.com/file/qsbv3k

austin at aw21 ~ $ du -h scan-build-2012-05-15-2.tar.bz2
42M	scan-build-2012-05-15-2.tar.bz2
austin at aw21 ~ $ sha1sum scan-build-2012-05-15-2.tar.bz2
442cf6faddb45515792d116717c992282496dfbe  scan-build-2012-05-15-2.tar.bz2

Cheers,
Austin



More information about the wine-devel mailing list