Page MenuHomePhabricator
Paste P7857

(An Untitled Masterwork)
ActivePublic

Authored by ema on Nov 28 2018, 11:23 AM.
Tags
None
Referenced Files
F27321619:
Nov 28 2018, 11:23 AM
Subscribers
None
$ tsxs -o objhits.so -c objhits.cc -lstdc++
compiling objhits.cc -> objhits.lo
objhits.cc:54:7: warning: variable 'resp_bufp' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
if (m->find(url) == m->end()) {
^~~~~~~~~~~~~~~~~~~~~~~~
objhits.cc:90:23: note: uninitialized use occurs here
TSHandleMLocRelease(resp_bufp, http_hdr_loc, new_field_loc);
^~~~~~~~~
objhits.cc:54:3: note: remove the 'if' if its condition is always false
if (m->find(url) == m->end()) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
objhits.cc:46:22: note: initialize the variable 'resp_bufp' to silence this warning
TSMBuffer resp_bufp;
^
= nullptr
objhits.cc:54:7: warning: variable 'http_hdr_loc' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
if (m->find(url) == m->end()) {
^~~~~~~~~~~~~~~~~~~~~~~~
objhits.cc:90:34: note: uninitialized use occurs here
TSHandleMLocRelease(resp_bufp, http_hdr_loc, new_field_loc);
^~~~~~~~~~~~
objhits.cc:54:3: note: remove the 'if' if its condition is always false
if (m->find(url) == m->end()) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
objhits.cc:48:22: note: initialize the variable 'http_hdr_loc' to silence this warning
TSMLoc http_hdr_loc;
^
= nullptr
objhits.cc:60:7: warning: variable 'new_field_loc' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
if (TSHttpTxnClientRespGet(txnp, &resp_bufp, &http_hdr_loc) != TS_SUCCESS) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
objhits.cc:90:48: note: uninitialized use occurs here
TSHandleMLocRelease(resp_bufp, http_hdr_loc, new_field_loc);
^~~~~~~~~~~~~
objhits.cc:60:3: note: remove the 'if' if its condition is always false
if (TSHttpTxnClientRespGet(txnp, &resp_bufp, &http_hdr_loc) != TS_SUCCESS) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
objhits.cc:54:7: warning: variable 'new_field_loc' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
if (m->find(url) == m->end()) {
^~~~~~~~~~~~~~~~~~~~~~~~
objhits.cc:90:48: note: uninitialized use occurs here
TSHandleMLocRelease(resp_bufp, http_hdr_loc, new_field_loc);
^~~~~~~~~~~~~
objhits.cc:54:3: note: remove the 'if' if its condition is always false
if (m->find(url) == m->end()) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
objhits.cc:50:23: note: initialize the variable 'new_field_loc' to silence this warning
TSMLoc new_field_loc;
^
= nullptr
4 warnings generated.
linking -> objhits.so