fix compiler errors instead of suppressing them

pull/13/head
Volker Grabsch 13 years ago
parent 80ea9c0737
commit 039b291ac0

@ -36,7 +36,7 @@ define $(PKG)_BUILD
$(MAKE) -C '$(1)' -j 1 install schemelib_DATA=
'$(TARGET)-gcc' \
-W -Wall -Werror -ansi -pedantic -Wno-unused-but-set-variable \
-W -Wall -Werror -ansi -pedantic \
'$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-guile.exe' \
`'$(TARGET)-pkg-config' guile-1.8 --cflags --libs`
endef

@ -16,6 +16,9 @@ int main(int argc, char *argv[])
test_boolean = TRUE;
test_int32 = 1;
(void)test_boolean;
(void)test_int32;
jpeg_create_decompress(&cinfo);
jpeg_destroy_decompress(&cinfo);

@ -26,7 +26,7 @@ define $(PKG)_BUILD
$(MAKE) -C '$(1)' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= man_MANS=
'$(TARGET)-gcc' \
-W -Wall -Werror -ansi -pedantic -Werror -Wno-unused-but-set-variable \
-W -Wall -Werror -ansi -pedantic -Werror \
'$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-jpeg.exe' \
-ljpeg
endef

@ -0,0 +1,30 @@
This file is part of mingw-cross-env.
See doc/index.html for further information.
This patch has been taken from:
http://icculus.org/pipermail/physfs/2011-March/000990.html
diff -ru physfs-2.0.2.orig/archivers/wad.c physfs-2.0.2/archivers/wad.c
--- physfs-2.0.2.orig/archivers/wad.c 2011-02-18 22:17:31.000000000 +0100
+++ physfs-2.0.2/archivers/wad.c 2011-03-27 14:55:10.000000000 +0200
@@ -245,9 +245,6 @@
PHYSFS_uint32 fileCount;
PHYSFS_uint32 directoryOffset;
WADentry *entry;
- char lastDirectory[9];
-
- lastDirectory[8] = 0; /* Make sure lastDirectory stays null-terminated. */
BAIL_IF_MACRO(!wad_open(name, forWriting, &fh, &fileCount,&directoryOffset), NULL, 0);
info->entryCount = fileCount;
diff -ru physfs-2.0.2.orig/platform/windows.c physfs-2.0.2/platform/windows.c
--- physfs-2.0.2.orig/platform/windows.c 2011-02-18 22:17:31.000000000 +0100
+++ physfs-2.0.2/platform/windows.c 2011-03-27 14:54:17.000000000 +0200
@@ -462,6 +462,7 @@
*/
rc = pGetUserProfileDirectoryW(accessToken, &dummy, &psize);
assert(!rc); /* !!! FIXME: handle this gracefully. */
+ (void)rc;
/* Allocate memory for the profile directory */
wstr = (LPWSTR) __PHYSFS_smallAlloc(psize * sizeof (WCHAR));

@ -24,8 +24,7 @@ define $(PKG)_BUILD
-DPHYSFS_BUILD_SHARED=FALSE \
-DPHYSFS_INTERNAL_ZLIB=FALSE \
-DPHYSFS_BUILD_TEST=FALSE \
-DPHYSFS_BUILD_WX_TEST=FALSE \
-DCMAKE_C_FLAGS='-Wno-unused-but-set-variable'
-DPHYSFS_BUILD_WX_TEST=FALSE
$(MAKE) -C '$(1)' -j '$(JOBS)' install
'$(TARGET)-gcc' \

@ -13,6 +13,7 @@ int main(int argc, char *argv[])
if (SDL_Init(SDL_INIT_EVERYTHING) < 0) return 1;
screen = SDL_SetVideoMode(640, 480, 32, SDL_HWSURFACE);
(void)screen;
SDL_Quit();
return 0;

@ -33,7 +33,7 @@ define $(PKG)_BUILD
ln -sf $(PREFIX)/$(TARGET)/bin/sdl-config $(PREFIX)/bin/$(TARGET)-sdl-config
'$(TARGET)-gcc' \
-W -Wall -Werror -ansi -pedantic -Wno-unused-but-set-variable \
-W -Wall -Werror -ansi -pedantic \
'$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-sdl.exe' \
`'$(TARGET)-pkg-config' sdl --cflags --libs`
endef

@ -11,6 +11,7 @@ int main(int argc, char *argv[])
(void)argv;
initted = Mix_Init(MIX_INIT_FLAC | MIX_INIT_OGG | MIX_INIT_MOD);
(void)initted;
Mix_Quit();
return 0;
}

@ -48,7 +48,7 @@ define $(PKG)_BUILD
$(MAKE) -C '$(1)' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS=
'$(TARGET)-gcc' \
-W -Wall -Werror -ansi -pedantic -Wno-unused-but-set-variable \
-W -Wall -Werror -ansi -pedantic \
'$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-sdl_mixer.exe' \
`'$(TARGET)-pkg-config' SDL_mixer --cflags --libs`
endef

Loading…
Cancel
Save