You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "Bryan Call (JIRA)" <ji...@apache.org> on 2016/09/08 04:22:21 UTC

[jira] [Created] (TS-4828) gcc warning comparison between signed and unsigned integer expressions

Bryan Call created TS-4828:
------------------------------

             Summary: gcc warning comparison between signed and unsigned integer expressions
                 Key: TS-4828
                 URL: https://issues.apache.org/jira/browse/TS-4828
             Project: Traffic Server
          Issue Type: Bug
          Components: Build
            Reporter: Bryan Call


Warnings when enabling -Wextra:
{noformat}
stats_over_http.c:137:62: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
       if (snprintf(b, sizeof(b), "\"%s\": " fmt ",\n", a, v) < sizeof(b)) {     \
--
stats_over_http.c:141:66: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
       if (snprintf(b, sizeof(b), "\"%s\": \"" fmt "\",\n", a, v) < sizeof(b)) { \
--
stats_over_http.c:137:62: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
       if (snprintf(b, sizeof(b), "\"%s\": " fmt ",\n", a, v) < sizeof(b)) {     \
--
stats_over_http.c:141:66: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
       if (snprintf(b, sizeof(b), "\"%s\": \"" fmt "\",\n", a, v) < sizeof(b)) { \
--
stats_over_http.c:137:62: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
       if (snprintf(b, sizeof(b), "\"%s\": " fmt ",\n", a, v) < sizeof(b)) {     \
--
stats_over_http.c:141:66: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
       if (snprintf(b, sizeof(b), "\"%s\": \"" fmt "\",\n", a, v) < sizeof(b)) { \
--
stats_over_http.c:130:64: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
     if (snprintf(b, sizeof(b), "\"%s\": \"" fmt "\",\n", a, v) < sizeof(b)) \
--
acme.c:267:27: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
     if (!path || path_len < (strlen(ACME_WK_PATH) + 2) || *path != '.' || memcmp(path, ACME_WK_PATH, strlen(ACME_WK_PATH))) {
--
remap_purge.c:149:57: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
     TSHttpTxnErrorBodySet(txnp, TSstrdup(response), len >= sizeof(response) ? sizeof(response) - 1 : len, NULL);
--
remap_purge.c:149:100: error: signed and unsigned type in conditional expression [-Werror=sign-compare]
     TSHttpTxnErrorBodySet(txnp, TSstrdup(response), len >= sizeof(response) ? sizeof(response) - 1 : len, NULL);
--
ts_lua_fetch.c:327:21: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
         if (key_len == TS_MIME_LEN_CONTENT_LENGTH && !strncasecmp(TS_MIME_FIELD_CONTENT_LENGTH, key, key_len)) { // Content-Length
--
ts_lua_fetch.c:330:28: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
         } else if (key_len == TS_MIME_LEN_HOST && !strncasecmp(TS_MIME_FIELD_HOST, key, key_len)) { // Host
--
ts_lua_fetch.c:333:28: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
         } else if (key_len == TS_MIME_LEN_USER_AGENT && !strncasecmp(TS_MIME_FIELD_USER_AGENT, key, key_len)) { // User-Agent
--
url_sig.c:522:17: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
   for (i = 0; i < sig_len; i++) {
--
http_load/http_load.c:1182:25: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
       for (i     = 0; i < sizeof(bytes); ++i)
{noformat}





--
This message was sent by Atlassian JIRA
(v6.3.4#6332)