Uploaded image for project: 'Qpid'
  1. Qpid
  2. QPID-8476

Reorder compiler warning [-Wreorder] in examples/messaging/spout.cpp

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • qpid-cpp-1.39.0
    • qpid-cpp-1.40.0
    • C++ Build
    • None
    • Patch

    Description

      Compilation prints the following warning. I am using GCC 9.

      [ 91%] Building CXX object examples/messaging/CMakeFiles/spout.dir/OptionParser.cpp.o
      /home/jdanek/.cache/bazel/_bazel_jdanek/36e30b937da1503cce68d3840f1df2bc/sandbox/linux-sandbox/24/execroot/cli_cpp/external/qpid-cpp/examples/messaging/spout.cpp: In constructor 'Options::Options()':
      /home/jdanek/.cache/bazel/_bazel_jdanek/36e30b937da1503cce68d3840f1df2bc/sandbox/linux-sandbox/24/execroot/cli_cpp/external/qpid-cpp/examples/messaging/spout.cpp:48:9: warning: 'Options::count' will be initialized after [-Wreorder]
         48 |     int count;
            |         ^~~~~
      /home/jdanek/.cache/bazel/_bazel_jdanek/36e30b937da1503cce68d3840f1df2bc/sandbox/linux-sandbox/24/execroot/cli_cpp/external/qpid-cpp/examples/messaging/spout.cpp:47:10: warning:   'bool Options::durable' [-Wreorder]
         47 |     bool durable;
            |          ^~~~~~~
      /home/jdanek/.cache/bazel/_bazel_jdanek/36e30b937da1503cce68d3840f1df2bc/sandbox/linux-sandbox/24/execroot/cli_cpp/external/qpid-cpp/examples/messaging/spout.cpp:57:5: warning:   when initialized here [-Wreorder]
         57 |     Options()
            |     ^~~~~~~
      

      There is a patch submitted at https://github.com/apache/qpid-cpp/pull/23

      Attachments

        Activity

          People

            jdanek Jiri Daněk
            jdanek Jiri Daněk
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: