diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-03-20 15:03:46 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-20 15:03:46 (GMT) |
commit | bdde027f6dc298cfd95053c562544a62dcfbd787 (patch) | |
tree | 84ca881c7184c5a419d06e483ad0f76bebcf1bec /src | |
parent | ae5702bf6c6bf8b7979561dc5112284dbb5b7cf8 (diff) | |
download | hdf5-bdde027f6dc298cfd95053c562544a62dcfbd787.zip hdf5-bdde027f6dc298cfd95053c562544a62dcfbd787.tar.gz hdf5-bdde027f6dc298cfd95053c562544a62dcfbd787.tar.bz2 |
Bring warning fixes from develop (#2608)
Diffstat (limited to 'src')
-rw-r--r-- | src/H5FDdirect.c | 22 | ||||
-rw-r--r-- | src/H5Gname.c | 5 | ||||
-rw-r--r-- | src/H5Gnode.c | 2 | ||||
-rw-r--r-- | src/H5Gobj.c | 10 | ||||
-rw-r--r-- | src/H5Gtraverse.c | 5 | ||||
-rw-r--r-- | src/H5HF.c | 19 | ||||
-rw-r--r-- | src/H5HFcache.c | 21 | ||||
-rw-r--r-- | src/H5HFman.c | 10 | ||||
-rw-r--r-- | src/H5Idbg.c | 4 | ||||
-rw-r--r-- | src/H5L.c | 10 | ||||
-rw-r--r-- | src/H5Ocache.c | 18 | ||||
-rw-r--r-- | src/H5make_libsettings.c | 65 |
12 files changed, 124 insertions, 67 deletions
diff --git a/src/H5FDdirect.c b/src/H5FDdirect.c index 81bf4af..b74ad07 100644 --- a/src/H5FDdirect.c +++ b/src/H5FDdirect.c @@ -382,15 +382,14 @@ done: static void * H5FD_direct_fapl_get(H5FD_t *_file) { - H5FD_direct_t *file = (H5FD_direct_t *)_file; - void *ret_value; /* Return value */ + H5FD_direct_t *file = (H5FD_direct_t *)_file; + void *ret_value = NULL; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_NOAPI_NOINIT_NOERR /* Set return value */ ret_value = H5FD_direct_fapl_copy(&(file->fa)); -done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5FD_direct_fapl_get() */ @@ -443,10 +442,10 @@ H5FD_direct_fapl_copy(const void *_old_fa) static H5FD_t * H5FD_direct_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr) { - int o_flags; - int fd = (-1); - H5FD_direct_t *file = NULL; - H5FD_direct_fapl_t *fa; + int o_flags; + int fd = (-1); + H5FD_direct_t *file = NULL; + const H5FD_direct_fapl_t *fa; #ifdef H5_HAVE_WIN32_API HFILE filehandle; struct _BY_HANDLE_FILE_INFORMATION fileinfo; @@ -495,7 +494,7 @@ H5FD_direct_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxadd /* Get the driver specific information */ if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list") - if (NULL == (fa = (H5FD_direct_fapl_t *)H5P_peek_driver_info(plist))) + if (NULL == (fa = (const H5FD_direct_fapl_t *)H5P_peek_driver_info(plist))) HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, NULL, "bad VFL driver info") file->fd = fd; @@ -545,7 +544,8 @@ H5FD_direct_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxadd } else { file->fa.must_align = FALSE; - HDftruncate(file->fd, (HDoff_t)0); + if (-1 == HDftruncate(file->fd, (HDoff_t)0)) + HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, NULL, "unable to truncate file") } } else { @@ -792,7 +792,7 @@ H5FD_direct_get_eof(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type) { const H5FD_direct_t *file = (const H5FD_direct_t *)_file; - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_NOAPI_NOINIT_NOERR FUNC_LEAVE_NOAPI(file->eof) } diff --git a/src/H5Gname.c b/src/H5Gname.c index 18e46ce..2c53507 100644 --- a/src/H5Gname.c +++ b/src/H5Gname.c @@ -512,9 +512,10 @@ H5G_name_copy(H5G_name_t *dst, const H5G_name_t *src, H5_copy_depth_t depth) dst->user_path_r = H5RS_dup(src->user_path_r); } else { - /* Discarding 'const' qualifier OK - QAK */ + H5_GCC_CLANG_DIAG_OFF("cast-qual") H5G_name_reset((H5G_name_t *)src); - } /* end if */ + H5_GCC_CLANG_DIAG_ON("cast-qual") + } FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5G_name_copy() */ diff --git a/src/H5Gnode.c b/src/H5Gnode.c index 9445b6e..20e496d 100644 --- a/src/H5Gnode.c +++ b/src/H5Gnode.c @@ -1224,7 +1224,9 @@ H5G__node_copy(H5F_t *f, const void H5_ATTR_UNUSED *_lt_key, haddr_t addr, const /* Set up group location for soft link to start in */ H5G_name_reset(&grp_path); grp_loc.path = &grp_path; + H5_GCC_CLANG_DIAG_OFF("cast-qual") grp_loc.oloc = (H5O_loc_t *)src_oloc; + H5_GCC_CLANG_DIAG_ON("cast-qual") /* Get pointer to link value in local heap */ if ((link_name = (char *)H5HL_offset_into(heap, tmp_src_ent.cache.slink.lval_offset)) == NULL) diff --git a/src/H5Gobj.c b/src/H5Gobj.c index 5ba14ad..7570a4f 100644 --- a/src/H5Gobj.c +++ b/src/H5Gobj.c @@ -242,21 +242,20 @@ H5G__obj_create_real(H5F_t *f, const H5O_ginfo_t *ginfo, const H5O_linfo_t *linf /* Check for format of group to create */ if (use_at_least_v18) { + H5_GCC_CLANG_DIAG_OFF("cast-qual") /* Insert link info message */ - /* (Casting away const OK - QAK) */ if (H5O_msg_create(oloc, H5O_LINFO_ID, 0, H5O_UPDATE_TIME, (void *)linfo) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create message") /* Insert group info message */ - /* (Casting away const OK - QAK) */ if (H5O_msg_create(oloc, H5O_GINFO_ID, H5O_MSG_FLAG_CONSTANT, 0, (void *)ginfo) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create message") /* Insert pipeline message */ if (pline && pline->nused) - /* (Casting away const OK - QAK) */ if (H5O_msg_create(oloc, H5O_PLINE_ID, H5O_MSG_FLAG_CONSTANT, 0, (void *)pline) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create message") + H5_GCC_CLANG_DIAG_ON("cast-qual") } /* end if */ else { H5O_stab_t stab; /* Symbol table message */ @@ -398,9 +397,10 @@ H5G_obj_stab_to_new_cb(const H5O_link_t *lnk, void *_udata) HDassert(udata); /* Insert link into group */ - /* (Casting away const OK - QAK) */ + H5_GCC_CLANG_DIAG_OFF("cast-qual") if (H5G_obj_insert(udata->grp_oloc, lnk->name, (H5O_link_t *)lnk, FALSE, H5O_TYPE_UNKNOWN, NULL) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, H5_ITER_ERROR, "can't insert link into group") + H5_GCC_CLANG_DIAG_ON("cast-qual") done: FUNC_LEAVE_NOAPI(ret_value) @@ -712,7 +712,7 @@ H5G__obj_info(const H5O_loc_t *oloc, H5G_info_t *grp_info) H5G_loc_reset(&grp_loc); /* Deep copy (duplicate) of the group location object */ - if (H5O_loc_copy_deep(&grp_oloc, (H5O_loc_t *)oloc) < 0) + if (H5O_loc_copy_deep(&grp_oloc, oloc) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTCOPY, FAIL, "can't copy object location") /* Open the group */ diff --git a/src/H5Gtraverse.c b/src/H5Gtraverse.c index d2d3a06..85b1dbc 100644 --- a/src/H5Gtraverse.c +++ b/src/H5Gtraverse.c @@ -706,18 +706,17 @@ H5G__traverse_real(const H5G_loc_t *_loc, const char *name, unsigned target, H5G HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to hold file open") /* Reset any non-default object header messages */ + H5_GCC_CLANG_DIAG_OFF("cast-qual") if (ginfo != &def_ginfo) - /* (Casting away const OK - QAK) */ if (H5O_msg_reset(H5O_GINFO_ID, (void *)ginfo) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "unable to reset group info message") if (linfo != &def_linfo) - /* (Casting away const OK - QAK) */ if (H5O_msg_reset(H5O_LINFO_ID, (void *)linfo) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "unable to reset link info message") if (pline != &def_pline) - /* (Casting away const OK - QAK) */ if (H5O_msg_reset(H5O_PLINE_ID, (void *)pline) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "unable to reset I/O pipeline message") + H5_GCC_CLANG_DIAG_ON("cast-qual") } /* end if */ else HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "component not found") @@ -116,8 +116,14 @@ H5HF_op_write(const void *obj, size_t obj_len, void *op_data) { FUNC_ENTER_NOAPI_NOINIT_NOERR - /* Perform "write", using memcpy() */ - H5MM_memcpy((void *)obj, op_data, obj_len); /* Casting away const OK -QAK */ + /* Perform "write", using memcpy() + * + * We cast away const here because no obj pointer that was originally + * const should ever arrive here. + */ + H5_GCC_CLANG_DIAG_OFF("cast-qual") + H5MM_memcpy((void *)obj, op_data, obj_len); + H5_GCC_CLANG_DIAG_ON("cast-qual") FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5HF_op_write() */ @@ -349,10 +355,15 @@ H5HF_insert(H5HF_t *fh, size_t size, const void *obj, void *id /*out*/) /* Check for 'huge' object */ if (size > hdr->max_man_size) { - /* Store 'huge' object in heap */ - /* (Casting away const OK - QAK) */ + /* Store 'huge' object in heap + * + * Although not ideal, we can quiet the const warning here because no + * obj pointer that was originally const should ever arrive here. + */ + H5_GCC_CLANG_DIAG_OFF("cast-qual") if (H5HF__huge_insert(hdr, size, (void *)obj, id) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTINSERT, FAIL, "can't store 'huge' object in fractal heap") + H5_GCC_CLANG_DIAG_ON("cast-qual") } /* end if */ /* Check for 'tiny' object */ else if (size <= hdr->tiny_max_len) { diff --git a/src/H5HFcache.c b/src/H5HFcache.c index 5839b56..7e4d5de 100644 --- a/src/H5HFcache.c +++ b/src/H5HFcache.c @@ -741,7 +741,11 @@ H5HF__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG_UN HDassert(len == hdr->heap_size); /* Set the shared heap header's file context for this operation */ + H5_GCC_DIAG_OFF("discarded-qualifiers") + H5_CLANG_DIAG_OFF("incompatible-pointer-types-discards-qualifiers") hdr->f = f; + H5_GCC_DIAG_ON("discarded-qualifiers") + H5_CLANG_DIAG_ON("incompatible-pointer-types-discards-qualifiers") /* Magic number */ H5MM_memcpy(image, H5HF_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC); @@ -1327,7 +1331,11 @@ H5HF__cache_iblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG hdr = iblock->hdr; /* Set the shared heap header's file context for this operation */ + H5_GCC_DIAG_OFF("discarded-qualifiers") + H5_CLANG_DIAG_OFF("incompatible-pointer-types-discards-qualifiers") hdr->f = f; + H5_GCC_DIAG_ON("discarded-qualifiers") + H5_CLANG_DIAG_ON("incompatible-pointer-types-discards-qualifiers") /* Magic number */ H5MM_memcpy(image, H5HF_IBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC); @@ -1654,9 +1662,15 @@ H5HF__cache_dblock_verify_chksum(const void *_image, size_t len, void *_udata) /* Update info about direct block */ udata->decompressed = TRUE; len = nbytes; - } /* end if */ - else - read_buf = (void *)image; /* Casting away const OK - QAK */ + } + else { + /* If the data are unfiltered, we just point to the image, which we + * never modify. Casting away const is okay here. + */ + H5_GCC_CLANG_DIAG_OFF("cast-qual") + read_buf = (void *)image; + H5_GCC_CLANG_DIAG_OFF("cast-qual") + } /* Decode checksum */ chk_size = (size_t)(H5HF_MAN_ABS_DIRECT_OVERHEAD(hdr) - H5HF_SIZEOF_CHKSUM); @@ -1668,7 +1682,6 @@ H5HF__cache_dblock_verify_chksum(const void *_image, size_t len, void *_udata) chk_p -= H5HF_SIZEOF_CHKSUM; /* Reset checksum field, for computing the checksum */ - /* (Casting away const OK - QAK) */ HDmemset(chk_p, 0, (size_t)H5HF_SIZEOF_CHKSUM); /* Compute checksum on entire direct block */ diff --git a/src/H5HFman.c b/src/H5HFman.c index af155cc..721d810 100644 --- a/src/H5HFman.c +++ b/src/H5HFman.c @@ -486,10 +486,16 @@ H5HF__man_write(H5HF_hdr_t *hdr, const uint8_t *id, const void *obj) HDassert(id); HDassert(obj); - /* Call the internal 'op' routine routine */ - /* (Casting away const OK - QAK) */ + /* Call the internal 'op' routine routine + * + * In this case, the callback operation needs to modify the obj buffer that + * was passed in as const. We quiet the warning here because an obj pointer + * that was originally const should *never* arrive here. + */ + H5_GCC_CLANG_DIAG_OFF("cast-qual") if (H5HF__man_op_real(hdr, id, H5HF_op_write, (void *)obj, H5HF_OP_MODIFY) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTOPERATE, FAIL, "unable to operate on heap object") + H5_GCC_CLANG_DIAG_ON("cast-qual") done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5Idbg.c b/src/H5Idbg.c index 0f246dc..9ca717f 100644 --- a/src/H5Idbg.c +++ b/src/H5Idbg.c @@ -93,11 +93,15 @@ H5I__id_dump_cb(void *_item, void H5_ATTR_UNUSED *_key, void *_udata) break; } case H5I_DATASET: { + H5_GCC_CLANG_DIAG_OFF("discarded-qualifiers") path = H5D_nameof(info->object); + H5_GCC_CLANG_DIAG_ON("discarded-qualifiers") break; } case H5I_DATATYPE: { + H5_GCC_CLANG_DIAG_OFF("discarded-qualifiers") path = H5T_nameof(info->object); + H5_GCC_CLANG_DIAG_ON("discarded-qualifiers") break; } case H5I_UNINIT: @@ -1620,8 +1620,9 @@ H5L__link_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t H5_AT udata->lnk->cset = H5F_DEFAULT_CSET; /* Default character encoding for link */ /* Set the link's name correctly */ - /* Casting away const OK -QAK */ + H5_GCC_CLANG_DIAG_OFF("cast-qual") udata->lnk->name = (char *)name; + H5_GCC_CLANG_DIAG_ON("cast-qual") /* Insert link into group */ if (H5G_obj_insert(grp_loc->oloc, name, udata->lnk, TRUE, @@ -2399,9 +2400,10 @@ H5L__move_dest_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "moving a link across files is not allowed") /* Give the object its new name */ - /* Casting away const okay -JML */ HDassert(udata->lnk->name == NULL); + H5_GCC_CLANG_DIAG_OFF("cast-qual") udata->lnk->name = (char *)name; + H5_GCC_CLANG_DIAG_ON("cast-qual") /* Insert the link into the group */ if (H5G_obj_insert(grp_loc->oloc, name, udata->lnk, TRUE, H5O_TYPE_UNKNOWN, NULL) < 0) @@ -3143,7 +3145,9 @@ H5L__link_copy_file(H5F_t *dst_file, const H5O_link_t *_src_lnk, const H5O_loc_t /* Set up group location for link */ H5G_name_reset(&lnk_grp_path); lnk_grp_loc.path = &lnk_grp_path; - lnk_grp_loc.oloc = (H5O_loc_t *)src_oloc; /* Casting away const OK -QAK */ + H5_GCC_CLANG_DIAG_OFF("cast-qual") + lnk_grp_loc.oloc = (H5O_loc_t *)src_oloc; + H5_GCC_CLANG_DIAG_ON("cast-qual") /* Check if the target object exists */ if ((tar_exists = H5G_loc_exists(&lnk_grp_loc, src_lnk->name)) < 0) diff --git a/src/H5Ocache.c b/src/H5Ocache.c index fd6552b..b32b82f 100644 --- a/src/H5Ocache.c +++ b/src/H5Ocache.c @@ -1429,11 +1429,13 @@ H5O__chunk_deserialize(H5O_t *oh, haddr_t addr, size_t chunk_size, const uint8_t oh->nmesgs++; /* Initialize information about message */ - mesg->dirty = FALSE; - mesg->flags = flags; - mesg->crt_idx = crt_idx; - mesg->native = NULL; - mesg->raw = (uint8_t *)chunk_image; /* Casting away const OK - QAK */ + mesg->dirty = FALSE; + mesg->flags = flags; + mesg->crt_idx = crt_idx; + mesg->native = NULL; + H5_GCC_CLANG_DIAG_OFF("cast-qual") + mesg->raw = (uint8_t *)chunk_image; + H5_GCC_CLANG_DIAG_ON("cast-qual") mesg->raw_size = mesg_size; mesg->chunkno = chunkno; @@ -1636,10 +1638,12 @@ H5O__chunk_serialize(const H5F_t *f, H5O_t *oh, unsigned chunkno) /* Encode any dirty messages in this chunk */ for (u = 0, curr_msg = &oh->mesg[0]; u < oh->nmesgs; u++, curr_msg++) - if (curr_msg->dirty && curr_msg->chunkno == chunkno) - /* Casting away const OK -QAK */ + if (curr_msg->dirty && curr_msg->chunkno == chunkno) { + H5_GCC_CLANG_DIAG_OFF("cast-qual") if (H5O_msg_flush((H5F_t *)f, oh, curr_msg) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTENCODE, FAIL, "unable to encode object header message") + H5_GCC_CLANG_DIAG_ON("cast-qual") + } /* Sanity checks */ if (oh->version > H5O_VERSION_1) diff --git a/src/H5make_libsettings.c b/src/H5make_libsettings.c index 34acd80..a428062 100644 --- a/src/H5make_libsettings.c +++ b/src/H5make_libsettings.c @@ -64,19 +64,27 @@ insert_libhdf5_settings(FILE *flibinfo) HDexit(EXIT_FAILURE); } - /* print variable definition and the string */ - /* Do not use const else AIX strings does not show it. */ - fprintf(flibinfo, "char H5libhdf5_settings[]=\n"); + /* Turn off warnings for large arrays. If the library info string is + * a problem, people can build without the embedded library info. + */ + HDfprintf(flibinfo, "#include \"H5private.h\"\n"); + HDfprintf(flibinfo, "H5_GCC_DIAG_OFF(\"larger-than=\")\n\n"); + HDfprintf(flibinfo, "H5_CLANG_DIAG_OFF(\"overlength-strings\")\n\n"); + + /* Print variable definition and the string. Do not use const or some + * platforms (AIX?) will have issues. + */ + HDfprintf(flibinfo, "char H5libhdf5_settings[]=\n"); bol++; while (EOF != (inchar = HDgetc(fsettings))) { if (bol) { /* Start a new line */ - fprintf(flibinfo, "\t\""); + HDfprintf(flibinfo, "\t\""); bol = 0; } if (inchar == '\n') { /* end of a line */ - fprintf(flibinfo, "\\n\"\n"); + HDfprintf(flibinfo, "\\n\"\n"); bol++; } else @@ -87,21 +95,26 @@ insert_libhdf5_settings(FILE *flibinfo) /* wrap up */ if (!bol) /* EOF found without a new line */ - fprintf(flibinfo, "\\n\"\n"); - fprintf(flibinfo, ";\n\n"); + HDfprintf(flibinfo, "\\n\"\n"); + HDfprintf(flibinfo, ";\n\n"); } else { - fprintf(stderr, "Read errors encountered with %s\n", LIBSETTINGSFNAME); + HDfprintf(stderr, "Read errors encountered with %s\n", LIBSETTINGSFNAME); HDexit(EXIT_FAILURE); } if (0 != HDfclose(fsettings)) { HDperror(LIBSETTINGSFNAME); HDexit(EXIT_FAILURE); } + + /* Re-enable warnings for large arrays */ + HDfprintf(rawoutstream, "H5_GCC_DIAG_ON(\"larger-than=\")\n"); + HDfprintf(rawoutstream, "H5_CLANG_DIAG_OFF(\"overlength-strings\")\n"); #else - /* Print variable definition and an empty string */ - /* Do not use const else AIX strings does not show it. */ - fprintf(flibinfo, "char H5libhdf5_settings[]=\"\";\n"); + /* Print variable definition and an empty string. Do not use const or some + * platforms (AIX?) will have issues. + */ + HDfprintf(flibinfo, "char H5libhdf5_settings[]=\"\";\n"); #endif } /* insert_libhdf5_settings() */ @@ -189,42 +202,42 @@ information about the library build configuration\n"; /* * The file header: warning, copyright notice, build information. */ - fprintf(rawoutstream, "/* Generated automatically by H5make_libsettings -- do not edit */\n\n\n"); + HDfprintf(rawoutstream, "/* Generated automatically by H5make_libsettings -- do not edit */\n\n\n"); HDfputs(FileHeader, rawoutstream); /*the copyright notice--see top of this file */ - fprintf(rawoutstream, " *\n * Created:\t\t%s %2d, %4d\n", month_name[tm->tm_mon], tm->tm_mday, - 1900 + tm->tm_year); + HDfprintf(rawoutstream, " *\n * Created:\t\t%s %2d, %4d\n", month_name[tm->tm_mon], tm->tm_mday, + 1900 + tm->tm_year); if (pwd || real_name[0] || host_name[0]) { - fprintf(rawoutstream, " *\t\t\t"); + HDfprintf(rawoutstream, " *\t\t\t"); if (real_name[0]) - fprintf(rawoutstream, "%s <", real_name); + HDfprintf(rawoutstream, "%s <", real_name); #ifdef H5_HAVE_GETPWUID if (pwd) HDfputs(pwd->pw_name, rawoutstream); #endif if (host_name[0]) - fprintf(rawoutstream, "@%s", host_name); + HDfprintf(rawoutstream, "@%s", host_name); if (real_name[0]) - fprintf(rawoutstream, ">"); + HDfprintf(rawoutstream, ">"); HDfputc('\n', rawoutstream); } - fprintf(rawoutstream, " *\n * Purpose:\t\t"); + HDfprintf(rawoutstream, " *\n * Purpose:\t\t"); for (s = purpose; *s; s++) { HDfputc(*s, rawoutstream); if ('\n' == *s && s[1]) - fprintf(rawoutstream, " *\t\t\t"); + HDfprintf(rawoutstream, " *\t\t\t"); } - fprintf(rawoutstream, " *\n * Modifications:\n *\n"); - fprintf(rawoutstream, " *\tDO NOT MAKE MODIFICATIONS TO THIS FILE!\n"); - fprintf(rawoutstream, " *\tIt was generated by code in `H5make_libsettings.c'.\n"); + HDfprintf(rawoutstream, " *\n * Modifications:\n *\n"); + HDfprintf(rawoutstream, " *\tDO NOT MAKE MODIFICATIONS TO THIS FILE!\n"); + HDfprintf(rawoutstream, " *\tIt was generated by code in `H5make_libsettings.c'.\n"); - fprintf(rawoutstream, " *\n *"); + HDfprintf(rawoutstream, " *\n *"); for (i = 0; i < 73; i++) HDfputc('-', rawoutstream); - fprintf(rawoutstream, "\n */\n\n"); + HDfprintf(rawoutstream, "\n */\n\n"); } /*------------------------------------------------------------------------- @@ -278,7 +291,7 @@ main(int argc, char *argv[]) if (rawoutstream && rawoutstream != stdout) { if (HDfclose(rawoutstream)) - fprintf(stderr, "closing rawoutstream"); + HDfprintf(stderr, "closing rawoutstream"); else rawoutstream = NULL; } |