requestFailure/requestSuccess may be used uninitialized in srmv2_GetRequestSummary.cpp

XMLWordPrintable

    • Type: Sub-task
    • Resolution: Unresolved
    • Priority: Major
    • None
    • Affects Version/s: None
    • Component/s: 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.

       

       

       

       

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

              Created:
              Updated: