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

Some improvements in C++ stubs for oneway operations

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 0.7
    • C++ - Compiler
    • None
    • Patch Available

    Description

      Oneway operations don't use the seqid or oprot parameters, so the generated stub should use unnamed parameters for those.

      While changing this I noticed that tfunction->is_oneway() is called many times, so cache that result in a local variable.

      While making that change, I noticed what seems to be an extraneous test for that, inside a loop which is already inside an if branch. I just commented that.

      So far, these changes make generated thrift stubs pass g++ -Wunused cleanly.

      Attachments

        1. diff.txt
          5 kB
          Rich Salz

        Activity

          People

            Unassigned Unassigned
            rsalz Rich Salz
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified