summaryrefslogtreecommitdiffstats
path: root/tools/h5toh4.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2001-01-09 21:22:30 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2001-01-09 21:22:30 (GMT)
commit35bc545296209684a5c46db0cde11beb9403a4dc (patch)
tree98b5a037ed928085b98abc1fee71fc62f81073c1 /tools/h5toh4.c
parent1290c4808d3e9890c765b1445f66b823c9026734 (diff)
downloadhdf5-35bc545296209684a5c46db0cde11beb9403a4dc.zip
hdf5-35bc545296209684a5c46db0cde11beb9403a4dc.tar.gz
hdf5-35bc545296209684a5c46db0cde11beb9403a4dc.tar.bz2
[svn-r3252] Purpose:
Code cleanup. Description: Fixed _lots_ (I mean _tons_) of warnings spit out by the gcc with the extra warnings. Including a few show-stoppers for compression on IRIX machines. Solution: Changed lots of variables' types to more sensible and consistent types, more range-checking, more variable typecasts, etc. Platforms tested: FreeBSD 4.2 (hawkwind), IRIX64-64 (modi4)
Diffstat (limited to 'tools/h5toh4.c')
-rw-r--r--tools/h5toh4.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/tools/h5toh4.c b/tools/h5toh4.c
index 19f4bf3..30b381c 100644
--- a/tools/h5toh4.c
+++ b/tools/h5toh4.c
@@ -18,7 +18,7 @@
#include <h5tools.h>
-#if WIN32
+#ifdef WIN32
typedef unsigned int mode_t;
#endif
@@ -41,11 +41,8 @@ extern herr_t convert_dataset_string(hid_t, char *, op_data_t *);
extern int32 h5type_to_h4type(hid_t);
extern hid_t h4type_to_memtype(int32);
-extern void init_table(table_t **temp);
extern void free_table(table_t **temp);
-extern void init_prefix(char **prefix, int length);
extern void dump_tables(char* name, table_t* table);
-extern herr_t find_objs(hid_t , const char *, void *);
extern int get_table_idx(table_t*, unsigned long *);
extern int get_tableflag(table_t*, int);
extern int set_tableflag(table_t*, int);
@@ -129,7 +126,7 @@ main(int argc, char *argv[])
break;
}
#ifndef WIN32
- if (test_file(h5_filename,O_EXCL,292) != 0 ) { /* 292 Decimal - 0444 Octal, a+r */
+ if (test_file(h5_filename,O_EXCL,(mode_t)(S_IRUSR|S_IRGRP|S_IROTH)) != 0 ) { /* 292 Decimal - 0444 Octal, a+r */
DEBUG_PRINT("Error detected in %s() [%s line %d]\n", "main", __FILE__, __LINE__);
status = -1;
break;
@@ -150,7 +147,7 @@ main(int argc, char *argv[])
break;
}
#ifndef WIN32
- if (test_file(h4_filename,O_CREAT|O_EXCL,436) != 0) { /* 436 Decimal - 0664 Octal, ug+rw,o+r */
+ if (test_file(h4_filename,O_CREAT|O_EXCL,(mode_t)(S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH)) != 0) { /* 436 Decimal - 0664 Octal, ug+rw,o+r */
DEBUG_PRINT("Error detected in %s() [%s line %d]\n", "main", __FILE__, __LINE__);
status = -1;
break;