diff options
author | Michael R Sweet <michael.r.sweet@gmail.com> | 2019-04-20 09:13:32 -0400 |
---|---|---|
committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2019-04-20 09:13:32 -0400 |
commit | 507c4adcc817c2d80643ecee2cb55dff305236f9 (patch) | |
tree | 0b4567e44b8a7af86fa75409858f76976bb82d80 /test | |
parent | 60d8f88456d1240720cec82ff7375dff439da56e (diff) | |
download | cups-507c4adcc817c2d80643ecee2cb55dff305236f9.tar.gz |
More clang warning fixes.
Diffstat (limited to 'test')
-rw-r--r-- | test/ippeveprinter.c | 3 | ||||
-rw-r--r-- | test/ipptool.c | 15 |
2 files changed, 6 insertions, 12 deletions
diff --git a/test/ippeveprinter.c b/test/ippeveprinter.c index 0e8720366..d37a4ff0c 100644 --- a/test/ippeveprinter.c +++ b/test/ippeveprinter.c @@ -4660,7 +4660,6 @@ process_http(ippeve_client_t *client) /* I - Client connection */ hostname[HTTP_MAX_HOST]; /* Hostname */ int port; /* Port number */ - const char *encoding; /* Content-Encoding value */ static const char * const http_states[] = { /* Strings for logging HTTP method */ "WAITING", @@ -4839,8 +4838,6 @@ process_http(ippeve_client_t *client) /* I - Client connection */ * Handle new transfers... */ - encoding = httpGetContentEncoding(client->http); - switch (client->operation) { case HTTP_STATE_OPTIONS : diff --git a/test/ipptool.c b/test/ipptool.c index e9a38274e..2c0f0c623 100644 --- a/test/ipptool.c +++ b/test/ipptool.c @@ -4777,6 +4777,8 @@ with_value(_cups_testdata_t *data, /* I - Test data */ * Value is an extended, case-sensitive POSIX regular expression... */ + void *adata; /* Pointer to octetString data */ + int adatalen; /* Length of octetString */ regex_t re; /* Regular expression */ if ((i = regcomp(&re, value, REG_EXTENDED | REG_NOSUB)) != 0) @@ -4793,16 +4795,13 @@ with_value(_cups_testdata_t *data, /* I - Test data */ for (i = 0; i < count; i ++) { - void *data; /* Pointer to octetString data */ - int datalen; /* Length of octetString */ - - if ((data = ippGetOctetString(attr, i, &datalen)) == NULL || datalen >= (int)sizeof(temp)) + if ((adata = ippGetOctetString(attr, i, &adatalen)) == NULL || adatalen >= (int)sizeof(temp)) { match = 0; break; } - memcpy(temp, data, (size_t)datalen); - temp[datalen] = '\0'; + memcpy(temp, adata, (size_t)adatalen); + temp[adatalen] = '\0'; if (!regexec(&re, temp, 0, NULL, 0)) { @@ -4828,9 +4827,7 @@ with_value(_cups_testdata_t *data, /* I - Test data */ { for (i = 0; i < count; i ++) { - int adatalen; - void *adata = ippGetOctetString(attr, i, &adatalen); - + adata = ippGetOctetString(attr, i, &adatalen); copy_hex_string(temp, adata, adatalen, sizeof(temp)); add_stringf(data->errors, "GOT: %s=\"%s\"", name, temp); } |