[
https://issues.apache.org/jira/browse/TS-4828?focusedWorklogId=28407&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-28407
]
ASF GitHub Bot logged work on TS-4828:
--------------------------------------
Author: ASF GitHub Bot
Created on: 08/Sep/16 04:23
Start Date: 08/Sep/16 04:23
Worklog Time Spent: 10m
Work Description: GitHub user bryancall opened a pull request:
https://github.com/apache/trafficserver/pull/989
TS-4828: gcc warning comparison between signed and unsigned integer e…
…xpressions
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/bryancall/trafficserver TS-4828
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/trafficserver/pull/989.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #989
----
commit 0289ef264b9e962856b97cb824b4d49b7b556a7d
Author: Bryan Call <[email protected]>
Date: 2016-09-08T04:23:12Z
TS-4828: gcc warning comparison between signed and unsigned integer
expressions
----
Issue Time Tracking
-------------------
Worklog Id: (was: 28407)
Time Spent: 10m
Remaining Estimate: 0h
> 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
> Assignee: Bryan Call
> Fix For: 7.0.0
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> 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)