summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@users.sourceforge.net>2009-11-28 17:51:27 +0100
committerTomas Bzatek <tbzatek@users.sourceforge.net>2009-11-28 17:51:27 +0100
commitae2be16f015cb0db7c5b6bd1669baaf53be702d1 (patch)
treec3741174f5f19cac05fbf721035669c637fa0150
parent013b75b7d655115503397ea4284b776802605080 (diff)
downloadtuxcmd-modules-ae2be16f015cb0db7c5b6bd1669baaf53be702d1.tar.xz
Tune cflags and fix some warnings
-rw-r--r--common/filelist-vfs-intf.h2
-rw-r--r--common/filelist.c2
-rw-r--r--gvfs/Makefile2
-rw-r--r--gvfs/gvfs.c2
-rw-r--r--libarchive/Makefile2
-rw-r--r--unrar/Makefile2
-rw-r--r--zip/Makefile2
-rw-r--r--zip/zip.cpp13
8 files changed, 13 insertions, 14 deletions
diff --git a/common/filelist-vfs-intf.h b/common/filelist-vfs-intf.h
index ce93e1e..ff3eeef 100644
--- a/common/filelist-vfs-intf.h
+++ b/common/filelist-vfs-intf.h
@@ -34,7 +34,7 @@
struct VfsFilelistData {
struct PathTree *files;
- unsigned int list_dir_index;
+ long int list_dir_index;
struct PathTree *list_dir_node;
char * list_dir_path;
diff --git a/common/filelist.c b/common/filelist.c
index cae250e..b6e5c0f 100644
--- a/common/filelist.c
+++ b/common/filelist.c
@@ -72,7 +72,7 @@ filelist_tree_free (struct PathTree *tree)
/* -------------------------------------------------------------------------------------- */
static void
-filelist_tree_print_recurr (struct PathTree *tree, int level)
+filelist_tree_print_recurr (struct PathTree *tree, unsigned int level)
{
char *fill;
int i;
diff --git a/gvfs/Makefile b/gvfs/Makefile
index 5e7f996..d2b9584 100644
--- a/gvfs/Makefile
+++ b/gvfs/Makefile
@@ -6,7 +6,7 @@ INSTALL_DATA = ${INSTALL} -m 644
# compiler options
CC = gcc
CFLAGS = -I. -I/usr/include \
- -Wall -fPIC -O2 -g \
+ -Wall -Wtype-limits -fPIC -O2 -g -ggdb \
-DG_DISABLE_DEPRECATED -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE
diff --git a/gvfs/gvfs.c b/gvfs/gvfs.c
index 6ef3a83..b88dcc4 100644
--- a/gvfs/gvfs.c
+++ b/gvfs/gvfs.c
@@ -1204,7 +1204,7 @@ guint64
VFSFileSeek (struct TVFSGlobs *globs, TVFSFileDes FileDescriptor, guint64 AbsoluteOffset, int *Error)
{
printf("(WW) VFSFileSeek: Not supported in GVFS plugin.\n");
- return -1;
+ return 0;
}
int
diff --git a/libarchive/Makefile b/libarchive/Makefile
index 26b4502..7604186 100644
--- a/libarchive/Makefile
+++ b/libarchive/Makefile
@@ -7,7 +7,7 @@ DIR_LIBARCHIVE = ./libarchive-2.7.1
# compiler options
CC = gcc
CFLAGS = -I. -I/usr/include \
- -Wall -fPIC -O2 -g \
+ -Wall -Wtype-limits -fPIC -O2 -g -ggdb \
-DG_DISABLE_DEPRECATED -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE \
-D__VERBOSE_DEBUGx
diff --git a/unrar/Makefile b/unrar/Makefile
index 14aa5fc..4e930da 100644
--- a/unrar/Makefile
+++ b/unrar/Makefile
@@ -8,7 +8,7 @@ DIR_UNRAR = unrar
CC = gcc
CPP = g++
CFLAGS = -I. -I/usr/include -I$(DIR_UNRAR) \
- -Wall -fPIC -O2 -g \
+ -Wall -Wtype-limits -fPIC -O2 -g -ggdb \
-DG_DISABLE_DEPRECATED -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE \
-D__VERBOSE_DEBUGx
diff --git a/zip/Makefile b/zip/Makefile
index 59a2534..eb45047 100644
--- a/zip/Makefile
+++ b/zip/Makefile
@@ -8,7 +8,7 @@ DIR_ZIPARCHIVE = ./ZipArchive/
CC = gcc
CPP = g++
CFLAGS = -I. -I$(DIR_ZIPARCHIVE) -I/usr/include \
- -Wall -fPIC -O2 -g \
+ -Wall -Wtype-limits -fPIC -O2 -g -ggdb \
-DG_DISABLE_DEPRECATED -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE \
-D__VERBOSE_DEBUGx
diff --git a/zip/zip.cpp b/zip/zip.cpp
index 577941f..adedfbc 100644
--- a/zip/zip.cpp
+++ b/zip/zip.cpp
@@ -112,7 +112,6 @@ get_vfs_errorcode (int m_iCause)
// case CZipException::bzInternalError: return cVFS_ReadErr; // Internal Bzlib library error.
default: return cVFS_WriteErr;
}
- return cVFS_Failed; // Default error
}
@@ -611,7 +610,7 @@ TVFSResult
VFSRemove (struct TVFSGlobs *globs, const char *APath)
{
char *AFile, *AFile1, *AFile2, *AFile3;
- unsigned long int file_no;
+ long int file_no;
printf ("(II) VFSRemove: Going to remove the file '%s'...\n", APath);
@@ -675,7 +674,7 @@ VFSRename (struct TVFSGlobs *globs, const char *sSrcName, const char *sDstName)
{
char *AFile;
char *ADestFile;
- unsigned long int file_no;
+ long int file_no;
printf ("(II) VFSRename: Going to rename/move the file '%s' to '%s'...\n", sSrcName, sDstName);
@@ -726,7 +725,7 @@ TVFSResult
VFSChmod (struct TVFSGlobs *globs, const char *FileName, guint32 Mode)
{
char *AFile;
- unsigned long int file_no;
+ long int file_no;
CZipFileHeader *header;
printf ("(II) VFSChmod: Going to change permissions of the file '%s'...\n", FileName);
@@ -767,7 +766,7 @@ VFSChmod (struct TVFSGlobs *globs, const char *FileName, guint32 Mode)
globs->zip->SetFileHeaderAttr (*header, (header->GetSystemAttr() & 0xFFFFF000) + (Mode & 0xFFF));
/* write local header information */
- globs->zip->OverwriteLocalHeader (file_no);
+ globs->zip->OverwriteLocalHeader (file_no);
#if 0
// Re-encrypt the file
@@ -812,7 +811,7 @@ TVFSResult
VFSChangeTimes (struct TVFSGlobs *globs, const char *APath, guint32 mtime, guint32 atime)
{
char *AFile;
- unsigned long int file_no;
+ long int file_no;
CZipFileHeader *header;
printf ("(II) VFSChangeTimes: Going to change date/times of the file '%s'...\n", APath);
@@ -935,7 +934,7 @@ TVFSResult
VFSCopyToLocal (struct TVFSGlobs *globs, const char *sSrcName, const char *sDstName, gboolean Append)
{
gboolean try_again;
- unsigned long int file_no;
+ long int file_no;
char *s;
char *dest_path;
char *dest_filename;