[Darshan-commits] [Git][darshan/darshan][master] 2 commits: clean up warnings in darshan runtime
Shane Snyder
xgitlab at cels.anl.gov
Mon Nov 30 15:51:19 CST 2020
Shane Snyder pushed to branch master at darshan / darshan
Commits:
860e3348 by Philip Carns at 2020-11-30T15:51:14-06:00
clean up warnings in darshan runtime
- nothing important here, just cutting down noise
- - - - -
583afaa1 by Shane Snyder at 2020-11-30T15:51:15-06:00
Merge branch 'carns/dev-warnings' into 'master'
Carns/dev warnings
See merge request darshan/darshan!68
- - - - -
5 changed files:
- darshan-runtime/lib/darshan-core.c
- darshan-runtime/lib/darshan-dxt.c
- darshan-runtime/lib/darshan-posix.c
- darshan-util/darshan-hdf5-logutils.c
- darshan-util/darshan-logutils.c
Changes:
=====================================
darshan-runtime/lib/darshan-core.c
=====================================
@@ -1083,13 +1083,17 @@ static void darshan_get_exe_and_mounts(struct darshan_core_runtime *core,
if(fh) {
ii = 0;
s = fgets(cmdl,DARSHAN_EXE_LEN,fh);
- for(i=1;i<DARSHAN_EXE_LEN;i++) {
- if(cmdl[i]==0 && ii == 0) {
- cmdl[i]=' '; ii = 1;
- } else if(cmdl[i]==0 && ii == 1) {
- break;
- } else {
- ii = 0;
+ if(!s)
+ sprintf(cmdl, "%s <unknown args>", __progname_full);
+ else {
+ for(i=1;i<DARSHAN_EXE_LEN;i++) {
+ if(cmdl[i]==0 && ii == 0) {
+ cmdl[i]=' '; ii = 1;
+ } else if(cmdl[i]==0 && ii == 1) {
+ break;
+ } else {
+ ii = 0;
+ }
}
}
fclose(fh);
=====================================
darshan-runtime/lib/darshan-dxt.c
=====================================
@@ -280,9 +280,6 @@ void dxt_posix_runtime_initialize()
#endif
.mod_shutdown_func = &dxt_posix_shutdown
};
- int ret;
- double tmpfloat;
- char *envstr;
/* determine whether tracing should be generally disabled/enabled */
if(getenv("DXT_ENABLE_IO_TRACE"))
@@ -348,9 +345,6 @@ void dxt_mpiio_runtime_initialize()
#endif
.mod_shutdown_func = &dxt_mpiio_shutdown
};
- int ret;
- double tmpfloat;
- char *envstr;
/* determine whether tracing should be generally disabled/enabled */
if(getenv("DXT_ENABLE_IO_TRACE"))
=====================================
darshan-runtime/lib/darshan-posix.c
=====================================
@@ -247,7 +247,7 @@ static int darshan_mem_alignment = 1;
#define POSIX_RECORD_READ(__ret, __fd, __pread_flag, __pread_offset, __aligned, __tm1, __tm2) do { \
struct posix_file_record_ref* rec_ref; \
- size_t stride; \
+ int64_t stride; \
int64_t this_offset; \
int64_t file_alignment; \
struct darshan_common_val_counter *cvc; \
@@ -310,7 +310,7 @@ static int darshan_mem_alignment = 1;
#define POSIX_RECORD_WRITE(__ret, __fd, __pwrite_flag, __pwrite_offset, __aligned, __tm1, __tm2) do { \
struct posix_file_record_ref* rec_ref; \
- size_t stride; \
+ int64_t stride; \
int64_t this_offset; \
int64_t file_alignment; \
struct darshan_common_val_counter *cvc; \
=====================================
darshan-util/darshan-hdf5-logutils.c
=====================================
@@ -224,14 +224,18 @@ static int darshan_log_get_hdf5_dataset(darshan_fd fd, void** hdf5_buf_p)
{
fprintf(stderr, "Error: Invalid H5D module version number (got %d)\n",
fd->mod_ver[DARSHAN_H5D_MOD]);
- return(-1);
+ ret = -1;
+ goto exit;
}
if(*hdf5_buf_p == NULL)
{
ds = malloc(sizeof(*ds));
if(!ds)
- return(-1);
+ {
+ ret = -1;
+ goto exit;
+ }
}
if(fd->mod_ver[DARSHAN_H5D_MOD] == DARSHAN_H5D_VER)
=====================================
darshan-util/darshan-logutils.c
=====================================
@@ -2097,7 +2097,6 @@ void darshan_log_get_name_records(darshan_fd fd,
{
int ret;
struct darshan_name_record_ref *name_hash = NULL;
- struct darshan_name_record_ref *ref = NULL;
struct darshan_name_record_ref *tmp = NULL;
struct darshan_name_record_ref *curr = NULL;
@@ -2140,7 +2139,6 @@ void darshan_log_get_filtered_name_records(darshan_fd fd,
int ret;
struct darshan_name_record_ref *name_hash = NULL;
- struct darshan_name_record_ref *ref = NULL;
struct darshan_name_record_ref *tmp = NULL;
struct darshan_name_record_ref *curr = NULL;
View it on GitLab: https://xgitlab.cels.anl.gov/darshan/darshan/-/compare/8cfe80ee8ac03b5bac544e1f4ed284b42bd0ffa4...583afaa13a78881a90582abdd12523752b77f740
--
View it on GitLab: https://xgitlab.cels.anl.gov/darshan/darshan/-/compare/8cfe80ee8ac03b5bac544e1f4ed284b42bd0ffa4...583afaa13a78881a90582abdd12523752b77f740
You're receiving this email because of your account on xgitlab.cels.anl.gov.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/darshan-commits/attachments/20201130/f265e8e1/attachment-0001.html>
More information about the Darshan-commits
mailing list