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

diroption_id may be used uninitialized in BolRequest.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 warning is

      BolRequest.cpp:283:41: warning: ‘diroption_id’ may be used uninitialized in this function [-Wmaybe-uninitialized]
                   query1_s << diroption_id << ")";
      

      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 big 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: