ref: 690b8c607fa01df486f00af03b068d11acd14d55
parent: 3ec6f425abbaf5fc6141fdff1783cd5d71005fe8
author: Chris Moeller <kode54@gmail.com>
date: Sat Dec 22 13:56:25 EST 2012
Silenced MSVC warning, removed unused variables, and reordered some code for pre-C99 compilers
--- a/dumb/src/it/readany.c
+++ b/dumb/src/it/readany.c
@@ -22,7 +22,9 @@
#include "dumb.h"
-#ifndef _MSC_VER
+#ifdef _MSC_VER
+#define strnicmp _strnicmp
+#else
#define strnicmp strncasecmp
#endif
@@ -118,9 +120,7 @@
static DUMBFILE *dumbfile_buffer_mod(DUMBFILE *f, unsigned char const* * signature, unsigned long * signature_size)
{
long read;
- int sample_number;
BUFFERED_MOD *bm = malloc(sizeof(*bm));
- unsigned char *ptr;
if (!bm) return NULL;
bm->buffered = malloc(32768);
@@ -318,12 +318,13 @@
if ( !duh )
{
dumbfile_mem_status memdata;
+ DUMBFILE * memf;
memdata.ptr = signature;
memdata.offset = 0;
memdata.size = signature_size;
- DUMBFILE * memf = dumbfile_open_ex(&memdata, &mem_dfs);
+ memf = dumbfile_open_ex(&memdata, &mem_dfs);
if ( memf )
{
duh = dumb_read_mod_quick( memf, restrict );