You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "Igor Galić (JIRA)" <ji...@apache.org> on 2013/07/04 11:05:20 UTC
[jira] [Commented] (TS-2001) clang complaint in HttpTransact.cc:
logical not is only applied to the left hand side of this comparison
[ https://issues.apache.org/jira/browse/TS-2001?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13699875#comment-13699875 ]
Igor Galić commented on TS-2001:
--------------------------------
Proposed patch:
{code}
diff --git proxy/http/HttpTransact.cc proxy/http/HttpTransact.cc
index b9e557e..eedc733 100644
--- proxy/http/HttpTransact.cc
+++ proxy/http/HttpTransact.cc
@@ -5183,7 +5183,7 @@ HttpTransact::RequestError_t HttpTransact::check_request_validity(State* s, HTTP
if ((scheme == URL_WKSIDX_HTTP || scheme == URL_WKSIDX_HTTPS) &&
(method == HTTP_WKSIDX_POST || method == HTTP_WKSIDX_PUSH || method == HTTP_WKSIDX_PUT) &&
! incoming_hdr->presence(MIME_PRESENCE_CONTENT_LENGTH) &&
- ! s->client_info.transfer_encoding == CHUNKED_ENCODING) {
+ s->client_info.transfer_encoding != CHUNKED_ENCODING) {
return NO_POST_CONTENT_LENGTH;
}
{code}
> clang complaint in HttpTransact.cc: logical not is only applied to the left hand side of this comparison
> --------------------------------------------------------------------------------------------------------
>
> Key: TS-2001
> URL: https://issues.apache.org/jira/browse/TS-2001
> Project: Traffic Server
> Issue Type: Bug
> Components: Cleanup
> Reporter: Igor Galić
>
> {code}
> CXX HttpTransact.o
> HttpTransact.cc:5186:9: error: logical not is only applied to the left hand side of this comparison [-Werror,-Wlogical-not-parentheses]
> ! s->client_info.transfer_encoding == CHUNKED_ENCODING) {
> ^ ~~
> HttpTransact.cc:5186:9: note: add parentheses after the '!' to evaluate the comparison first
> ! s->client_info.transfer_encoding == CHUNKED_ENCODING) {
> ^
> ( )
> HttpTransact.cc:5186:9: note: add parentheses around left hand side expression to silence this warning
> ! s->client_info.transfer_encoding == CHUNKED_ENCODING) {
> ^
> ( )
> 1 error generated.
> make[3]: *** [HttpTransact.o] Error 1
> make[3]: Leaving directory `/home/igalic/src/asf/trafficserver/proxy/http'
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira