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

dirOptionId may be used uninitialized in PtgRequest.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

      /PtgRequest.cpp:277:36: warning: ‘dirOptionId’ may be used uninitialized in this function [-Wmaybe-uninitialized]
                query_s << dirOptionId << ", ";
      

      but in fact that var cannot be used uninitialized, because the existing initialization cannot fail without an exception being raised and a continue statement be called.

      However the warning needs to be fixed. One possibility is to put all the code in the loop in one single try block, with all the catch'es at the end.

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

              Created:
              Updated: