[ 
https://issues.apache.org/jira/browse/TS-2549?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Leif Hedstrom updated TS-2549:
------------------------------

    Fix Version/s: 4.2.0

> Compiler warnings on OSX (clang) with the CPP APIs
> --------------------------------------------------
>
>                 Key: TS-2549
>                 URL: https://issues.apache.org/jira/browse/TS-2549
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: TS API
>            Reporter: Leif Hedstrom
>             Fix For: 4.2.0
>
>
> {code}
>   CXX      TransformationPlugin.lo
> TransformationPlugin.cc:94:166: warning: format specifies type 'long' but the 
> argument has type 'int64_t' (aka 'long long') [-Wformat]
>     do { TSDebug("atscppapi" "." "TransformationPlugin.cc" ":" "94" , "[%s()] 
> " "Transformation contp=%p write_vio=%p, to_read=%ld", __FUNCTION__, contp, 
> write_vio, to_read); } while (false);
>                                                                               
>                                                  ~~~                          
>          ^~~~~~~
>                                                                               
>                                                  %lld
> TransformationPlugin.cc:102:194: warning: format specifies type 'long' but 
> the argument has type 'int64_t' (aka 'long long') [-Wformat]
>       do { TSDebug("atscppapi" "." "TransformationPlugin.cc" ":" "102" , 
> "[%s()] " "Transformation contp=%p write_vio=%p, to_read=%ld, buffer reader 
> avail=%ld", __FUNCTION__, contp, write_vio, to_read, avail); } while (false);
>                                                                               
>                                                     ~~~                       
>                                      ^~~~~~~
>                                                                               
>                                                     %lld
> TransformationPlugin.cc:102:203: warning: format specifies type 'long' but 
> the argument has type 'int64_t' (aka 'long long') [-Wformat]
>       do { TSDebug("atscppapi" "." "TransformationPlugin.cc" ":" "102" , 
> "[%s()] " "Transformation contp=%p write_vio=%p, to_read=%ld, buffer reader 
> avail=%ld", __FUNCTION__, contp, write_vio, to_read, avail); } while (false);
>                                                                               
>                                                                              
> ~~~                                            ^~~~~
>                                                                               
>                                                                              
> %lld
> TransformationPlugin.cc:106:250: warning: format specifies type 'long' but 
> the argument has type 'int64_t' (aka 'long long') [-Wformat]
>         do { TSDebug("atscppapi" "." "TransformationPlugin.cc" ":" "106" , 
> "[%s()] " "Transformation contp=%p write_vio=%p, to read > avail, fixing 
> to_read to be equal to avail. to_read=%ld, buffer reader avail=%ld", 
> __FUNCTION__, contp, write_vio, to_read, avail); } while (false);
>                                                                               
>                                                                               
>                               ~~~                                             
>                ^~~~~~~
>                                                                               
>                                                                               
>                               %lld
> TransformationPlugin.cc:106:259: warning: format specifies type 'long' but 
> the argument has type 'int64_t' (aka 'long long') [-Wformat]
>         do { TSDebug("atscppapi" "." "TransformationPlugin.cc" ":" "106" , 
> "[%s()] " "Transformation contp=%p write_vio=%p, to read > avail, fixing 
> to_read to be equal to avail. to_read=%ld, buffer reader avail=%ld", 
> __FUNCTION__, contp, write_vio, to_read, avail); } while (false);
>                                                                               
>                                                                               
>                                                        ~~~                    
>                         ^~~~~
>                                                                               
>                                                                               
>                                                        %lld
> TransformationPlugin.cc:264:208: warning: format specifies type 'long' but 
> the argument has type 'int64_t' (aka 'long long') [-Wformat]
>   do { TSDebug("atscppapi" "." "TransformationPlugin.cc" ":" "264" , "[%s()] 
> " "TransformationPlugin=%p tshttptxn=%p write to TSIOBuffer %ld bytes total 
> bytes written %ld", __FUNCTION__, this, state_->txn_, bytes_written, 
> state_->bytes_written_); } while (false);
>                                                                               
>                                                            ~~~                
>                                                    ^~~~~~~~~~~~~
>                                                                               
>                                                            %lld
> TransformationPlugin.cc:264:223: warning: format specifies type 'long' but 
> the argument has type 'int64_t' (aka 'long long') [-Wformat]
>   do { TSDebug("atscppapi" "." "TransformationPlugin.cc" ":" "264" , "[%s()] 
> " "TransformationPlugin=%p tshttptxn=%p write to TSIOBuffer %ld bytes total 
> bytes written %ld", __FUNCTION__, this, state_->txn_, bytes_written, 
> state_->bytes_written_); } while (false);
>                                                                               
>                                                                               
>            ~~~                                                    
> ^~~~~~~~~~~~~~~~~~~~~~
>                                                                               
>                                                                               
>            %lld
> TransformationPlugin.cc:268:233: warning: format specifies type 'long' but 
> the argument has type 'int64_t' (aka 'long long') [-Wformat]
>     do { do { TSDebug("atscppapi" "." "TransformationPlugin.cc" ":" "268" , 
> "[%s()] " "[ERROR] " "TransformationPlugin=%p tshttptxn=%p bytes written < 
> expected. bytes_written=%ld write_length=%ld", __FUNCTION__, this, 
> state_->txn_, bytes_written, write_length); } while (false); TSError("[%s] 
> [%s:%d, %s()] " "TransformationPlugin=%p tshttptxn=%p bytes written < 
> expected. bytes_written=%ld write_length=%ld", "atscppapi", 
> "TransformationPlugin.cc", 268, __FUNCTION__, this, state_->txn_, 
> bytes_written, write_length); } while (false);
>                                                                               
>                                                                               
>                    ~~~                                                      
> ^~~~~~~~~~~~~
>                                                                               
>                                                                               
>                    %lld
> TransformationPlugin.cc:268:248: warning: format specifies type 'long' but 
> the argument has type 'int64_t' (aka 'long long') [-Wformat]
>     do { do { TSDebug("atscppapi" "." "TransformationPlugin.cc" ":" "268" , 
> "[%s()] " "[ERROR] " "TransformationPlugin=%p tshttptxn=%p bytes written < 
> expected. bytes_written=%ld write_length=%ld", __FUNCTION__, this, 
> state_->txn_, bytes_written, write_length); } while (false); TSError("[%s] 
> [%s:%d, %s()] " "TransformationPlugin=%p tshttptxn=%p bytes written < 
> expected. bytes_written=%ld write_length=%ld", "atscppapi", 
> "TransformationPlugin.cc", 268, __FUNCTION__, this, state_->txn_, 
> bytes_written, write_length); } while (false);
>                                                                               
>                                                                               
>                                     ~~~                                       
>              ^~~~~~~~~~~~
>                                                                               
>                                                                               
>                                     %lld
> TransformationPlugin.cc:268:490: warning: format specifies type 'long' but 
> the argument has type 'int64_t' (aka 'long long') [-Wformat]
>     do { do { TSDebug("atscppapi" "." "TransformationPlugin.cc" ":" "268" , 
> "[%s()] " "[ERROR] " "TransformationPlugin=%p tshttptxn=%p bytes written < 
> expected. bytes_written=%ld write_length=%ld", __FUNCTION__, this, 
> state_->txn_, bytes_written, write_length); } while (false); TSError("[%s] 
> [%s:%d, %s()] " "TransformationPlugin=%p tshttptxn=%p bytes written < 
> expected. bytes_written=%ld write_length=%ld", "atscppapi", 
> "TransformationPlugin.cc", 268, __FUNCTION__, this, state_->txn_, 
> bytes_written, write_length); } while (false);
>                                                                               
>                                                                               
>                                                                               
>                                                                               
>                                                                            
> ~~~                                                                           
>                         ^~~~~~~~~~~~~
>                                                                               
>                                                                               
>                                                                               
>                                                                               
>                                                                            
> %lld
> TransformationPlugin.cc:268:505: warning: format specifies type 'long' but 
> the argument has type 'int64_t' (aka 'long long') [-Wformat]
>     do { do { TSDebug("atscppapi" "." "TransformationPlugin.cc" ":" "268" , 
> "[%s()] " "[ERROR] " "TransformationPlugin=%p tshttptxn=%p bytes written < 
> expected. bytes_written=%ld write_length=%ld", __FUNCTION__, this, 
> state_->txn_, bytes_written, write_length); } while (false); TSError("[%s] 
> [%s:%d, %s()] " "TransformationPlugin=%p tshttptxn=%p bytes written < 
> expected. bytes_written=%ld write_length=%ld", "atscppapi", 
> "TransformationPlugin.cc", 268, __FUNCTION__, this, state_->txn_, 
> bytes_written, write_length); } while (false);
>                                                                               
>                                                                               
>                                                                               
>                                                                               
>                                                                               
>               ~~~                                                             
>                                     ^~~~~~~~~~~~
>                                                                               
>                                                                               
>                                                                               
>                                                                               
>                                                                               
>               %lld
> TransformationPlugin.cc:285:258: warning: format specifies type 'long' but 
> the argument has type 'int64_t' (aka 'long long') [-Wformat]
>   do { TSDebug("atscppapi" "." "TransformationPlugin.cc" ":" "285" , "[%s()] 
> " "OutputComplete TransformationPlugin=%p tshttptxn=%p vconn=%p 
> connection_closed=%d, total bytes written=%ld", __FUNCTION__, this, 
> state_->txn_, state_->vconn_, connection_closed,state_->bytes_written_); } 
> while (false);
>                                                                               
>                                                                               
>                            ~~~                                                
>                        ^~~~~~~~~~~~~~~~~~~~~~
>                                                                               
>                                                                               
>                            %lld
> 12 warnings generated.
>   CXX      Logger.lo
>   CXX      Stat.lo
>   CXX      AsyncHttpFetch.lo
>   CXX      RemapPlugin.lo
>   CXX      GzipDeflateTransformation.lo
> GzipDeflateTransformation.cc:151:205: warning: format specifies type 'long' 
> but the argument has type 'int64_t' (aka 'long long') [-Wformat]
>     do { do { TSDebug("atscppapi" "." "GzipDeflateTransformation.cc" ":" 
> "151" , "[%s()] " "[ERROR] " "Gzip bytes produced sanity check failed, 
> deflated bytes = %ld != written bytes = %ld", __FUNCTION__, 
> state_->bytes_produced_, bytes_written); } while (false); TSError("[%s] 
> [%s:%d, %s()] " "Gzip bytes produced sanity check failed, deflated bytes = 
> %ld != written bytes = %ld", "atscppapi", "GzipDeflateTransformation.cc", 
> 151, __FUNCTION__, state_->bytes_produced_, bytes_written); } while (false);
>                                                                               
>                                                                               
>      ~~~                                        ^~~~~~~~~~~~~~~~~~~~~~~
>                                                                               
>                                                                               
>      %lld
> GzipDeflateTransformation.cc:151:230: warning: format specifies type 'long' 
> but the argument has type 'int64_t' (aka 'long long') [-Wformat]
>     do { do { TSDebug("atscppapi" "." "GzipDeflateTransformation.cc" ":" 
> "151" , "[%s()] " "[ERROR] " "Gzip bytes produced sanity check failed, 
> deflated bytes = %ld != written bytes = %ld", __FUNCTION__, 
> state_->bytes_produced_, bytes_written); } while (false); TSError("[%s] 
> [%s:%d, %s()] " "Gzip bytes produced sanity check failed, deflated bytes = 
> %ld != written bytes = %ld", "atscppapi", "GzipDeflateTransformation.cc", 
> 151, __FUNCTION__, state_->bytes_produced_, bytes_written); } while (false);
>                                                                               
>                                                                               
>                             ~~~                                          
> ^~~~~~~~~~~~~
>                                                                               
>                                                                               
>                             %lld
> GzipDeflateTransformation.cc:151:445: warning: format specifies type 'long' 
> but the argument has type 'int64_t' (aka 'long long') [-Wformat]
>     do { do { TSDebug("atscppapi" "." "GzipDeflateTransformation.cc" ":" 
> "151" , "[%s()] " "[ERROR] " "Gzip bytes produced sanity check failed, 
> deflated bytes = %ld != written bytes = %ld", __FUNCTION__, 
> state_->bytes_produced_, bytes_written); } while (false); TSError("[%s] 
> [%s:%d, %s()] " "Gzip bytes produced sanity check failed, deflated bytes = 
> %ld != written bytes = %ld", "atscppapi", "GzipDeflateTransformation.cc", 
> 151, __FUNCTION__, state_->bytes_produced_, bytes_written); } while (false);
>                                                                               
>                                                                               
>                                                                               
>                                                                               
>                                        ~~~                                    
>                                                       ^~~~~~~~~~~~~~~~~~~~~~~
>                                                                               
>                                                                               
>                                                                               
>                                                                               
>                                        %lld
> GzipDeflateTransformation.cc:151:470: warning: format specifies type 'long' 
> but the argument has type 'int64_t' (aka 'long long') [-Wformat]
>     do { do { TSDebug("atscppapi" "." "GzipDeflateTransformation.cc" ":" 
> "151" , "[%s()] " "[ERROR] " "Gzip bytes produced sanity check failed, 
> deflated bytes = %ld != written bytes = %ld", __FUNCTION__, 
> state_->bytes_produced_, bytes_written); } while (false); TSError("[%s] 
> [%s:%d, %s()] " "Gzip bytes produced sanity check failed, deflated bytes = 
> %ld != written bytes = %ld", "atscppapi", "GzipDeflateTransformation.cc", 
> 151, __FUNCTION__, state_->bytes_produced_, bytes_written); } while (false);
>                                                                               
>                                                                               
>                                                                               
>                                                                               
>                                                               ~~~             
>                                                                               
>  ^~~~~~~~~~~~~
>                                                                               
>                                                                               
>                                                                               
>                                                                               
>                                                               %lld
> 4 warnings generated.
>   CXX      GzipInflateTransformation.lo
> GzipInflateTransformation.cc:125:205: warning: format specifies type 'long' 
> but the argument has type 'int64_t' (aka 'long long') [-Wformat]
>     do { do { TSDebug("atscppapi" "." "GzipInflateTransformation.cc" ":" 
> "125" , "[%s()] " "[ERROR] " "Gzip bytes produced sanity check failed, 
> inflated bytes = %ld != written bytes = %ld", __FUNCTION__, 
> state_->bytes_produced_, bytes_written); } while (false); TSError("[%s] 
> [%s:%d, %s()] " "Gzip bytes produced sanity check failed, inflated bytes = 
> %ld != written bytes = %ld", "atscppapi", "GzipInflateTransformation.cc", 
> 125, __FUNCTION__, state_->bytes_produced_, bytes_written); } while (false);
>                                                                               
>                                                                               
>      ~~~                                        ^~~~~~~~~~~~~~~~~~~~~~~
>                                                                               
>                                                                               
>      %lld
> GzipInflateTransformation.cc:125:230: warning: format specifies type 'long' 
> but the argument has type 'int64_t' (aka 'long long') [-Wformat]
>     do { do { TSDebug("atscppapi" "." "GzipInflateTransformation.cc" ":" 
> "125" , "[%s()] " "[ERROR] " "Gzip bytes produced sanity check failed, 
> inflated bytes = %ld != written bytes = %ld", __FUNCTION__, 
> state_->bytes_produced_, bytes_written); } while (false); TSError("[%s] 
> [%s:%d, %s()] " "Gzip bytes produced sanity check failed, inflated bytes = 
> %ld != written bytes = %ld", "atscppapi", "GzipInflateTransformation.cc", 
> 125, __FUNCTION__, state_->bytes_produced_, bytes_written); } while (false);
>                                                                               
>                                                                               
>                             ~~~                                          
> ^~~~~~~~~~~~~
>                                                                               
>                                                                               
>                             %lld
> GzipInflateTransformation.cc:125:445: warning: format specifies type 'long' 
> but the argument has type 'int64_t' (aka 'long long') [-Wformat]
>     do { do { TSDebug("atscppapi" "." "GzipInflateTransformation.cc" ":" 
> "125" , "[%s()] " "[ERROR] " "Gzip bytes produced sanity check failed, 
> inflated bytes = %ld != written bytes = %ld", __FUNCTION__, 
> state_->bytes_produced_, bytes_written); } while (false); TSError("[%s] 
> [%s:%d, %s()] " "Gzip bytes produced sanity check failed, inflated bytes = 
> %ld != written bytes = %ld", "atscppapi", "GzipInflateTransformation.cc", 
> 125, __FUNCTION__, state_->bytes_produced_, bytes_written); } while (false);
>                                                                               
>                                                                               
>                                                                               
>                                                                               
>                                        ~~~                                    
>                                                       ^~~~~~~~~~~~~~~~~~~~~~~
>                                                                               
>                                                                               
>                                                                               
>                                                                               
>                                        %lld
> GzipInflateTransformation.cc:125:470: warning: format specifies type 'long' 
> but the argument has type 'int64_t' (aka 'long long') [-Wformat]
>     do { do { TSDebug("atscppapi" "." "GzipInflateTransformation.cc" ":" 
> "125" , "[%s()] " "[ERROR] " "Gzip bytes produced sanity check failed, 
> inflated bytes = %ld != written bytes = %ld", __FUNCTION__, 
> state_->bytes_produced_, bytes_written); } while (false); TSError("[%s] 
> [%s:%d, %s()] " "Gzip bytes produced sanity check failed, inflated bytes = 
> %ld != written bytes = %ld", "atscppapi", "GzipInflateTransformation.cc", 
> 125, __FUNCTION__, state_->bytes_produced_, bytes_written); } while (false);
>                                                                               
>                                                                               
>                                                                               
>                                                                               
>                                                               ~~~             
>                                                                               
>  ^~~~~~~~~~~~~
>                                                                               
>                                                                               
>                                                                               
>                                                                               
>                                                               %lld



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to