Thrift
  1. Thrift
  2. THRIFT-1395

Patch to prevent warnings for integer types in some cases

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.8
    • Fix Version/s: 0.8
    • Component/s: None
    • Labels:
      None
    • Environment:

      Windows

    • Patch Info:
      Patch Available

      Description

      Constants such as i32 = 0x80000000 produce a Delphi warning. The current code renders such values as positive integer, which needs an explicit typecast to satisfy the Delphi compiler.

        Activity

        Hide
        Jens Geyer added a comment -

        Adds the explicit typecast when necessary.

        Show
        Jens Geyer added a comment - Adds the explicit typecast when necessary.
        Hide
        Kenjiro Fukumitsu added a comment - - edited

        Hi.

        I think values should be compared to 0x7F(FF)*, not 0x7F(00)*.

        Show
        Kenjiro Fukumitsu added a comment - - edited Hi. I think values should be compared to 0x7F(FF)*, not 0x7F(00)*.
        Hide
        Jens Geyer added a comment -

        FIX: Now more exactly comparing against 0x7FFF,0x7FFFFFFF, etc instead of 0x7F00,0x7F000000 etc.

        Show
        Jens Geyer added a comment - FIX: Now more exactly comparing against 0x7FFF,0x7FFFFFFF , etc instead of 0x7F00,0x7F000000 etc.
        Hide
        Kenjiro Fukumitsu added a comment -

        @Jens

        Code works no problem.
        White space indent is nicer than tab, I think.

        Show
        Kenjiro Fukumitsu added a comment - @Jens Code works no problem. White space indent is nicer than tab, I think.
        Hide
        Jens Geyer added a comment -

        Updated: space indents, code style

        Show
        Jens Geyer added a comment - Updated: space indents, code style
        Hide
        Jake Farrell added a comment -

        Thanks for the patch, committed

        Show
        Jake Farrell added a comment - Thanks for the patch, committed
        Hide
        Hudson added a comment -

        Integrated in Thrift #306 (See https://builds.apache.org/job/Thrift/306/)
        Thrift-1395: Patch to prevent warnings for integer types in some cases
        Client: delpi
        Patch: Jens Geyer

        Constants such as i32 = 0x80000000 produce a Delphi warning. The current code renders such values as positive integer, which needs an explicit typecast to satisfy the Delphi compiler.

        Show
        Hudson added a comment - Integrated in Thrift #306 (See https://builds.apache.org/job/Thrift/306/ ) Thrift-1395: Patch to prevent warnings for integer types in some cases Client: delpi Patch: Jens Geyer Constants such as i32 = 0x80000000 produce a Delphi warning. The current code renders such values as positive integer, which needs an explicit typecast to satisfy the Delphi compiler.
        Hide
        Hudson added a comment -

        Integrated in Thrift #307 (See https://builds.apache.org/job/Thrift/307/)
        THRIFT-1406: Build error after applying THRIFT-1395
        Client: delphi
        Patch: Jens Geyer

        Fixes build failure due to t_delphi_generator.cc:780: error: integer constant is too
        large for 'long' type

        jfarrell : http://svn.apache.org/viewvc/?view=rev&rev=1189006
        Files :

        • /thrift/trunk/compiler/cpp/src/generate/t_delphi_generator.cc
        Show
        Hudson added a comment - Integrated in Thrift #307 (See https://builds.apache.org/job/Thrift/307/ ) THRIFT-1406 : Build error after applying THRIFT-1395 Client: delphi Patch: Jens Geyer Fixes build failure due to t_delphi_generator.cc:780: error: integer constant is too large for 'long' type jfarrell : http://svn.apache.org/viewvc/?view=rev&rev=1189006 Files : /thrift/trunk/compiler/cpp/src/generate/t_delphi_generator.cc

          People

          • Assignee:
            Jens Geyer
            Reporter:
            Jens Geyer
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development