summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/guile.mk2
-rw-r--r--src/jpeg-test.c3
-rw-r--r--src/jpeg.mk2
-rw-r--r--src/physfs-1-fix-gcc46-warnings.patch30
-rw-r--r--src/physfs.mk3
-rw-r--r--src/sdl-test.c1
-rw-r--r--src/sdl.mk2
-rw-r--r--src/sdl_mixer-test.c1
-rw-r--r--src/sdl_mixer.mk2
9 files changed, 40 insertions, 6 deletions
diff --git a/src/guile.mk b/src/guile.mk
index 33ac8de..453099b 100644
--- a/src/guile.mk
+++ b/src/guile.mk
@@ -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
diff --git a/src/jpeg-test.c b/src/jpeg-test.c
index 244d9bd..0b8cdb2 100644
--- a/src/jpeg-test.c
+++ b/src/jpeg-test.c
@@ -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);
diff --git a/src/jpeg.mk b/src/jpeg.mk
index a54657f..edfeb20 100644
--- a/src/jpeg.mk
+++ b/src/jpeg.mk
@@ -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
diff --git a/src/physfs-1-fix-gcc46-warnings.patch b/src/physfs-1-fix-gcc46-warnings.patch
new file mode 100644
index 0000000..adf92b7
--- /dev/null
+++ b/src/physfs-1-fix-gcc46-warnings.patch
@@ -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));
diff --git a/src/physfs.mk b/src/physfs.mk
index 03ee23b..09ba205 100644
--- a/src/physfs.mk
+++ b/src/physfs.mk
@@ -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' \
diff --git a/src/sdl-test.c b/src/sdl-test.c
index 7691fe8..0ebf4ee 100644
--- a/src/sdl-test.c
+++ b/src/sdl-test.c
@@ -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;
diff --git a/src/sdl.mk b/src/sdl.mk
index 2d746b9..bf6fede 100644
--- a/src/sdl.mk
+++ b/src/sdl.mk
@@ -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
diff --git a/src/sdl_mixer-test.c b/src/sdl_mixer-test.c
index 56305fa..02b9306 100644
--- a/src/sdl_mixer-test.c
+++ b/src/sdl_mixer-test.c
@@ -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;
}
diff --git a/src/sdl_mixer.mk b/src/sdl_mixer.mk
index 0cfd35a..d61b5ef 100644
--- a/src/sdl_mixer.mk
+++ b/src/sdl_mixer.mk
@@ -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