diff options
author | Joe Orton <jorton@redhat.com> | 2017-02-15 09:30:06 +0000 |
---|---|---|
committer | dormando <dormando@rydia.net> | 2017-02-26 10:18:19 -0800 |
commit | 64bbbf4c7655a540247db4b608b00f809742f24b (patch) | |
tree | 6dfe43a24f04a2245e9fecee94f285f16acdb6b4 /util.c | |
parent | dc5f65d38a4c8f8b51e0dace323374ec76fcc647 (diff) | |
download | memcached-64bbbf4c7655a540247db4b608b00f809742f24b.tar.gz |
Print with more-restricted format string to fix compiler warning
with gcc 7's -Wformat-truncation.
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -18,7 +18,7 @@ void uriencode_init(void) { if (isalnum(x) || x == '-' || x == '.' || x == '_' || x == '~') { uriencode_map[x] = NULL; } else { - snprintf(str, 4, "%%%02X", x); + snprintf(str, 4, "%%%02hhX", (unsigned char)x); uriencode_map[x] = str; str += 3; /* lobbing off the \0 is fine */ } |