diff options
author | Mark Adler <madler@alumni.caltech.edu> | 2017-01-01 12:23:04 -0800 |
---|---|---|
committer | Mark Adler <madler@alumni.caltech.edu> | 2017-01-01 22:24:37 -0800 |
commit | 7358ef23c2b412543196df58c333ebc9aabb1d62 (patch) | |
tree | ed332a8d0f06936f357cfda5031ab2a1eec2ea21 /gzlib.c | |
parent | 20e472546e1fb3018cebe59040644f0b6198902d (diff) | |
download | zlib-7358ef23c2b412543196df58c333ebc9aabb1d62.tar.gz |
Avoid warnings on snprintf() return value.
Diffstat (limited to 'gzlib.c')
-rw-r--r-- | gzlib.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -211,7 +211,7 @@ local gzFile gz_open(path, fd, mode) else #endif #if !defined(NO_snprintf) && !defined(NO_vsnprintf) - snprintf(state->path, len + 1, "%s", (const char *)path); + (void)snprintf(state->path, len + 1, "%s", (const char *)path); #else strcpy(state->path, path); #endif @@ -293,7 +293,7 @@ gzFile ZEXPORT gzdopen(fd, mode) if (fd == -1 || (path = (char *)malloc(7 + 3 * sizeof(int))) == NULL) return NULL; #if !defined(NO_snprintf) && !defined(NO_vsnprintf) - snprintf(path, 7 + 3 * sizeof(int), "<fd:%d>", fd); /* for debugging */ + (void)snprintf(path, 7 + 3 * sizeof(int), "<fd:%d>", fd); #else sprintf(path, "<fd:%d>", fd); /* for debugging */ #endif @@ -608,8 +608,8 @@ void ZLIB_INTERNAL gz_error(state, err, msg) return; } #if !defined(NO_snprintf) && !defined(NO_vsnprintf) - snprintf(state->msg, strlen(state->path) + strlen(msg) + 3, - "%s%s%s", state->path, ": ", msg); + (void)snprintf(state->msg, strlen(state->path) + strlen(msg) + 3, + "%s%s%s", state->path, ": ", msg); #else strcpy(state->msg, state->path); strcat(state->msg, ": "); |