ref: 0bc29b4eb63b5758cf0d174258b6b072a3041a33
parent: 991ce8202643a296969d9a623e9702966a957e69
author: Carlos Rafael Giani <dv@pseudoterminal.org>
date: Sun Jun 30 12:43:31 EDT 2013
various fixes to address GCC warnings
--- a/dumb/src/helpers/resamp2.inc
+++ b/dumb/src/helpers/resamp2.inc
@@ -117,7 +117,9 @@
if ( lvolr == lvolt ) volume_left = NULL; \
} else { \
lvol = 0; \
+ lvold = 0; \
lvolt = 0; \
+ lvolm = 0; \
} \
if ( volume_right ) { \
rvolr = (int)(volume_right->volume * 16777216.0); \
@@ -128,7 +130,9 @@
if ( rvolr == rvolt ) volume_right = NULL; \
} else { \
rvol = 0; \
+ rvold = 0; \
rvolt = 0; \
+ rvolm = 0; \
} \
}
#define RETURN_VOLUME_VARIABLES { \
--- a/dumb/src/helpers/resample.inc
+++ b/dumb/src/helpers/resample.inc
@@ -141,7 +141,9 @@
if ( volr == volt ) volume = NULL; \
} else { \
vol = 0; \
+ vold = 0; \
volt = 0; \
+ volm = 0; \
} \
}
#define RETURN_MONO_DEST_VOLUME_VARIABLES if ( volume ) volume->volume = (float)volr / 16777216.0f
@@ -258,7 +260,9 @@
if ( lvolr == lvolt ) volume_left = NULL; \
} else { \
lvol = 0; \
+ lvold = 0; \
lvolt = 0; \
+ lvolm = 0; \
} \
if ( volume_right ) { \
rvolr = (int)(volume_right->volume * 16777216.0); \
@@ -269,7 +273,9 @@
if ( rvolr == rvolt ) volume_right = NULL; \
} else { \
rvol = 0; \
+ rvold = 0; \
rvolt = 0; \
+ rvolm = 0; \
} \
}
#define RETURN_MONO_DEST_VOLUME_VARIABLES { \
--- a/dumb/src/it/readamf.c
+++ b/dumb/src/it/readamf.c
@@ -390,7 +390,7 @@
goto error_ott;
}
- if ( dumbfile_getnc( ( char * ) trackmap, ntracks * sizeof( unsigned short ), f ) != ntracks * sizeof( unsigned short ) ) {
+ if ( dumbfile_getnc( ( char * ) trackmap, ntracks * sizeof( unsigned short ), f ) != (long)(ntracks * sizeof( unsigned short )) ) {
goto error_tm;
}
--- a/dumb/src/it/readany.c
+++ b/dumb/src/it/readany.c
@@ -23,9 +23,12 @@
#include "dumb.h"
#ifdef _MSC_VER
-#define strnicmp _strnicmp
+ #define strnicmp _strnicmp
#else
-#define strnicmp strncasecmp
+ #if defined(unix) || defined(__unix__) || defined(__unix)
+ #include <strings.h>
+ #endif
+ #define strnicmp strncasecmp
#endif
enum { maximum_signature_size = 0x30 };
--- a/dumb/src/it/readpsm.c
+++ b/dumb/src/it/readpsm.c
@@ -464,7 +464,7 @@
PSMCHUNK *songchunk;
int n_song_chunks = 0;
- PSMEVENT *event;
+ PSMEVENT *event = 0;
int n_events = 0;
unsigned char * ptr;
@@ -1212,6 +1212,8 @@
{
size_t i, j, na, nb;
char * p;
+
+ na = nb = 0;
i = memcmp( a, b, l );
if ( !i ) return i;
--- a/dumb/src/it/reads3m.c
+++ b/dumb/src/it/reads3m.c
@@ -651,6 +651,7 @@
long offset;
int m;
+ offset = 0;
if (dumbfile_seek(f, component[n].offset, DFS_SEEK_SET)) {
free(buffer);
free(component);
--- a/dumb/src/it/readstm.c
+++ b/dumb/src/it/readstm.c
@@ -26,9 +26,12 @@
#include "internal/it.h"
#ifdef _MSC_VER
-#define strnicmp _strnicmp
+ #define strnicmp _strnicmp
#else
-#define strnicmp strncasecmp
+ #if defined(unix) || defined(__unix__) || defined(__unix)
+ #include <strings.h>
+ #endif
+ #define strnicmp strncasecmp
#endif
static int it_stm_read_sample_header( IT_SAMPLE *sample, DUMBFILE *f, unsigned short *offset )