diff src/physfs-1-fix-gcc46-warnings.patch @ 1707:4e48476ea587

fix compiler errors instead of suppressing them
author Volker Grabsch <vog@notjusthosting.com>
date Sun, 27 Mar 2011 15:49:26 +0200
parents
children f653602a0500
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/physfs-1-fix-gcc46-warnings.patch	Sun Mar 27 15:49:26 2011 +0200
@@ -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));