Uploaded image for project: 'ROOT'
  1. ROOT
  2. ROOT-8064

excessive warning messages from ROOT cling

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 6.04/12
    • Fix Version/s: 6.10/00
    • Component/s: Cling
    • Labels:
      None
    • Environment:

      lxplus

    • Development:

      Description

      Dear experts,

      The ATLAS analysis frameworks often times exhibit a strange behavior that I was able to trace down to plain ROOT cling.

      Please consider the following script:

      #include "TROOT.h"
      #include "TString.h"
       
      #include <iostream>
       
      int main(){
       
        TString str = "kRed";
        int val = kRed;
       
        for(size_t i=0; i<100000; i++){
          int valx = gROOT->ProcessLine(str+";");
          if (val != valx){
            std::cout << "oups!" << std::endl;
            exit(1);
          } else {
            std::cout << ".";
          }
        }
        std::cout << std::endl;
        return 0;
      }

      The first couple of thousand iterations run fine, but after several ten thousand calls to the interpreter, warnings of the following type start to appear:

      In file included from input_line_6:{somenumber}:
      In file included from {/path/to/some/header/file}
      input_line_{somenumber}:2:2: warning: expression result unused [-Wunused-value]

      This does not affect the results of the code, but makes any log file or output stream highly unintelligible. Is it possible to somehow suppress these messages entirely?

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              axel Axel Naumann
              Reporter:
              cburgard Carsten Daniel Burgard
              Votes:
              2 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: