File sword-1.6.1-fix_compiler_warnings.patch of Package sword
Remove compiler warnings so SWORD will compile with -Wall -Werror
Index: src/utilfuns/zlib/untgz.c
===================================================================
--- src/utilfuns/zlib/untgz.c.orig
+++ src/utilfuns/zlib/untgz.c
@@ -13,6 +13,8 @@
#include <fcntl.h>
#ifdef unix
# include <unistd.h>
+# include <sys/stat.h>
+# include <sys/types.h>
#else
# include <direct.h>
# include <io.h>
@@ -80,7 +82,7 @@ union tar_buffer {
enum { TGZ_EXTRACT = 0, TGZ_LIST };
-static char *TGZfname OF((const char *));
+// static char *TGZfname OF((const char *));
void TGZnotfound OF((const char *));
int getoct OF((char *, int));
@@ -105,22 +107,23 @@ static char *TGZprefix[] = { "\0", ".tgz
/* Return the real name of the TGZ archive */
/* or NULL if it does not exist. */
-static char *TGZfname OF((const char *fname))
-{
- static char buffer[1024];
- int origlen,i;
-
- strcpy(buffer,fname);
- origlen = strlen(buffer);
-
- for (i=0; TGZprefix[i]; i++)
- {
- strcpy(buffer+origlen,TGZprefix[i]);
- if (access(buffer,F_OK) == 0)
- return buffer;
- }
- return NULL;
-}
+// COMMENTED OUT 20090516 for SWORD
+// static char *TGZfname OF((const char *fname))
+// {
+// static char buffer[1024];
+// int origlen,i;
+//
+// strcpy(buffer,fname);
+// origlen = strlen(buffer);
+//
+// for (i=0; TGZprefix[i]; i++)
+// {
+// strcpy(buffer+origlen,TGZprefix[i]);
+// if (access(buffer,F_OK) == 0)
+// return buffer;
+// }
+// return NULL;
+// }
/* error message for the filename */