summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2001-06-18 20:22:10 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2001-06-18 20:22:10 (GMT)
commitd41b9fffdfca2e97c36bc0ad0899fbb7b055f926 (patch)
tree51ed39b08a41a4f6947af07630eb40dfdb013d87 /src
parentfcaf572430a8eda3f6519bd21311ef7a8e3c3c1f (diff)
downloadhdf5-d41b9fffdfca2e97c36bc0ad0899fbb7b055f926.zip
hdf5-d41b9fffdfca2e97c36bc0ad0899fbb7b055f926.tar.gz
hdf5-d41b9fffdfca2e97c36bc0ad0899fbb7b055f926.tar.bz2
[svn-r4012] Purpose:
Clean up compiler warnings. Description: Just code neatening mostly, some casts, etc. Platforms tested: FreeBSD 4.3 (hawkwind)
Diffstat (limited to 'src')
-rw-r--r--src/H5.c2
-rw-r--r--src/H5FD.c8
-rw-r--r--src/H5FDlog.c2
-rw-r--r--src/H5FDstdio.c9
-rw-r--r--src/H5Fprivate.h2
-rw-r--r--src/H5Sselect.c2
-rw-r--r--src/H5Tprivate.h2
-rw-r--r--src/H5private.h8
8 files changed, 16 insertions, 19 deletions
diff --git a/src/H5.c b/src/H5.c
index 5b33830..85a31f6 100644
--- a/src/H5.c
+++ b/src/H5.c
@@ -36,9 +36,11 @@
#endif
/* We need this on Irix64 even though we've included stdio.h as documented */
+#ifdef FIXME_ON_IRIX_THEN
#if !defined __MWERKS__
FILE *fdopen(int fd, const char *mode);
#endif
+#endif /* FIXME_ON_IRIX_THEN */
#define PABLO_MASK H5_mask
diff --git a/src/H5FD.c b/src/H5FD.c
index 9dbdfcb..83c9999 100644
--- a/src/H5FD.c
+++ b/src/H5FD.c
@@ -1295,16 +1295,16 @@ H5FD_alloc(H5FD_t *file, H5FD_mem_t type, hsize_t size)
}
#endif
assert(tmp); /* bark in debug mode */
- if (tmp){
- if (tmp->size = (best->size - head - size)){
+ if (tmp) {
+ if ((tmp->size = (best->size - head - size))) {
tmp->addr = best->addr + head + size;
tmp->next = best->next;
best->next = tmp;
- }else{
+ } else {
/* no tail piece */
H5MM_xfree(tmp);
}
- }else{
+ } else {
/* cannot keep the tail piece. leak file memory. */
}
best->size = head;
diff --git a/src/H5FDlog.c b/src/H5FDlog.c
index ba16810..4c37651 100644
--- a/src/H5FDlog.c
+++ b/src/H5FDlog.c
@@ -986,7 +986,7 @@ H5FD_log_write(H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t UNUSED dxpl_id, hadd
while (size>0) {
do {
assert(size==(hsize_t)((size_t)size)); /*check for overflow*/
- nbytes = HDwrite(file->fd, (void*)buf, (size_t)size);
+ nbytes = HDwrite(file->fd, buf, (size_t)size);
} while (-1==nbytes && EINTR==errno);
if (-1==nbytes) {
/* error */
diff --git a/src/H5FDstdio.c b/src/H5FDstdio.c
index 6463fcb..b4da5ce 100644
--- a/src/H5FDstdio.c
+++ b/src/H5FDstdio.c
@@ -14,24 +14,23 @@
#include <stdlib.h>
#include <sys/stat.h>
+#include "hdf5.h"
+
#ifdef H5_HAVE_UNISTD_H
#include <unistd.h>
#endif
-
-
-#include "hdf5.h"
-
#ifdef MAX
#undef MAX
#endif /* MAX */
#define MAX(X,Y) ((X)>(Y)?(X):(Y))
+
#ifndef F_OK
#define F_OK 00
#define W_OK 02
#define R_OK 04
-
#endif
+
/* The driver identification number, initialized at runtime */
static hid_t H5FD_STDIO_g = 0;
diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h
index 26412a7..e442b37 100644
--- a/src/H5Fprivate.h
+++ b/src/H5Fprivate.h
@@ -364,7 +364,7 @@ __DLL__ void * H5F_istore_chunk_free(void *chunk);
__DLL__ void H5F_addr_encode(H5F_t *, uint8_t** /*in,out*/, haddr_t);
__DLL__ void H5F_addr_decode(H5F_t *, const uint8_t** /*in,out*/,
haddr_t* /*out*/);
-__DLL__ herr_t H5F_addr_pack(H5F_t UNUSED *f, haddr_t *addr_p /*out*/,
+__DLL__ herr_t H5F_addr_pack(H5F_t *f, haddr_t *addr_p /*out*/,
const unsigned long objno[2]);
#endif
diff --git a/src/H5Sselect.c b/src/H5Sselect.c
index c97d237..18c10e1 100644
--- a/src/H5Sselect.c
+++ b/src/H5Sselect.c
@@ -214,7 +214,7 @@ H5Sget_select_npoints(hid_t spaceid)
PURPOSE
Get the number of elements in current selection
USAGE
- herr_t H5Sselect_hyperslab(ds)
+ herr_t H5S_get_select_npoints(ds)
H5S_t *ds; IN: Dataspace pointer
RETURNS
The number of elements in selection on success, 0 on failure
diff --git a/src/H5Tprivate.h b/src/H5Tprivate.h
index 079ea1e..28d505c 100644
--- a/src/H5Tprivate.h
+++ b/src/H5Tprivate.h
@@ -130,7 +130,7 @@ __DLL__ char *H5T_enum_nameof(H5T_t *dt, void *value, char *name/*out*/,
size_t size);
__DLL__ herr_t H5T_enum_valueof(H5T_t *dt, const char *name,
void *value/*out*/);
-__DLL__ herr_t H5T_vlen_reclaim(void *elem, hid_t type_id, hsize_t UNUSED ndim, hssize_t UNUSED *point, void UNUSED *_op_data);
+__DLL__ herr_t H5T_vlen_reclaim(void *elem, hid_t type_id, hsize_t ndim, hssize_t *point, void *_op_data);
__DLL__ htri_t H5T_vlen_mark(H5T_t *dt, H5F_t *f, H5T_vlen_loc_t loc);
/* Reference specific functions */
diff --git a/src/H5private.h b/src/H5private.h
index b9f1156..fcaf4c2 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -761,15 +761,11 @@ __DLL__ int64_t HDstrtoll (const char *s, const char **rest, int base);
*/
#ifdef WIN32
#define HDstrdup(S) _strdup(S)
-#else
+#else /* WIN32 */
-#ifdef LATER
-#if !defined strdup && !defined HAVE_STRDUP
+#if !defined strdup && !defined H5_HAVE_STRDUP
extern char *strdup(const char *s);
#endif
-#else /* LATER */
-extern char *strdup(const char *s);
-#endif /* LATER */
#define HDstrdup(S) strdup(S)