Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-1036

Auto-generated C++ code fails to compile with "-Werror -Wextra -Wall" g++ compiler flags

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.7
    • 0.7
    • C++ - Compiler
    • None
    • OS: FreeBSD-8.0
      Compiler: g++ (GCC) 4.2.1 20070719 [FreeBSD]

    • Patch Available

    Description

      If the following command is used to auto-generate the C++ code
      thrift --gen cpp:cob_style foo.thrift
      then some of the auto-generated code contains the following:

      class FooCobClient : virtual public FooCobClIf {
      ...
      virtual void completed__(bool success) {}
      ...
      };

      The above code fails to compile if we use g++ with the "-Werror -Wextra -Wall" compiler options:
      gen-cpp/Foo.h:767: warning: unused parameter 'success'

      The solution is trivial: just comment-out the unused "success" argument when the code is
      auto-generated (see attached patch).

      Attachments

        1. thrift-jira-1036.patch
          0.5 kB
          Pavlin Radoslavov

        Activity

          People

            roger Roger Meier
            pavlin Pavlin Radoslavov
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 10m
                10m
                Remaining:
                Remaining Estimate - 10m
                10m
                Logged:
                Time Spent - Not Specified
                Not Specified