summaryrefslogtreecommitdiffstats
path: root/tools/gifconv
diff options
context:
space:
mode:
Diffstat (limited to 'tools/gifconv')
-rw-r--r--tools/gifconv/hdf2gif.c8
-rw-r--r--tools/gifconv/hdfgifwr.c2
2 files changed, 7 insertions, 3 deletions
diff --git a/tools/gifconv/hdf2gif.c b/tools/gifconv/hdf2gif.c
index c2ddb10..cc7bab4 100644
--- a/tools/gifconv/hdf2gif.c
+++ b/tools/gifconv/hdf2gif.c
@@ -16,7 +16,7 @@
*/
#include <stdio.h>
-
+#include <assert.h>
#include "gif.h"
#define MAX_FILE_LEN 256
@@ -208,8 +208,10 @@ int main(int argc , char **argv)
return -1;
}
- RWidth = dim_sizes[1];
- RHeight = dim_sizes[0];
+ assert(dim_sizes[0]==(hsize_t)((int)dim_sizes[0]));
+ assert(dim_sizes[1]==(hsize_t)((int)dim_sizes[1]));
+ RWidth = (int)dim_sizes[1];
+ RHeight = (int)dim_sizes[0];
#ifdef UNUSED
w = dim_sizes[1];
h = dim_sizes[0];
diff --git a/tools/gifconv/hdfgifwr.c b/tools/gifconv/hdfgifwr.c
index b13b79a..9804098 100644
--- a/tools/gifconv/hdfgifwr.c
+++ b/tools/gifconv/hdfgifwr.c
@@ -152,7 +152,9 @@ static unsigned long cur_accum = 0;
static int cur_bits = 0;
#define MAXCODE(n_bits) ( (1 << (n_bits)) - 1)
+#ifndef WIN32
#define min(a,b) ((a>b) ? b : a)
+#endif
#define XV_BITS 12 /* BITS was already defined on some systems */
#define MSDOS 1
#define HSIZE 5003 /* 80% occupancy */