Uploaded image for project: 'StoRM'
  1. StoRM
  2. STOR-1393 Cleanup frontend codebase II
  3. STOR-1388

requestFailure/requestSuccess may be used uninitialized in srmv2_GetRequestSummary.cpp

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • None
    • frontend
    • Security Level: Public (Visbile by non-authn users.)
    • None

      The compiler warns that

       

      srmv2_GetRequestSummary.cpp: In function ‘int ns1__srmGetRequestSummary(soap*, ns1__srmGetRequestSummaryRequest*, ns1__srmGetRequestSummaryResponse_*)’:
      srmv2_GetRequestSummary.cpp:344:12: warning: ‘requestFailure’ may be used uninitialized in this function [-Wmaybe-uninitialized]
           } else if (requestFailure) {
                  ^~
      srmv2_GetRequestSummary.cpp:340:5: warning: ‘requestSuccess’ may be used uninitialized in this function [-Wmaybe-uninitialized]
           if (requestSuccess) {
           ^~
      

      Very likely the two variabilized are in fact initialized when used, because the control flow would exit earlier if something fails before the initialization. Confirmation is needed, though.

      In any case, the warning needs to be fixed.

       

       

       

       

            giaco Francesco Giacomini
            giaco Francesco Giacomini
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: