summaryrefslogtreecommitdiffstats
path: root/src/physfs-1-fix-gcc46-warnings.patch
blob: c81b11202c34f3d14c8b8dcdad33fc2805ecf90b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
This file is part of MXE.
See 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));