Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-2148

WiredTiger triggers clang 3.7's Wshift-negative-value warning

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: WT2.7.0
    • Labels:
      None
    • # Replies:
      3
    • Last comment by Customer:
      true

      Description

      This warning is enabled and treated as an error with the compiler flags used by mongodb.

      In file included from src/third_party/wiredtiger/src/async/async_op.c:9:
      In file included from src/third_party/wiredtiger/src/include/wt_internal.h:334:
      src/third_party/wiredtiger/src/include/intpack.i:231:10: error: shifting a negative signed value is undefined [-Werror,-Wshift-negative-value]
              if (x < NEG_2BYTE_MIN) {
                      ^~~~~~~~~~~~~
      src/third_party/wiredtiger/src/include/intpack.i:42:30: note: expanded from macro 'NEG_2BYTE_MIN'
      #define NEG_2BYTE_MIN (((-1) << 13) + NEG_1BYTE_MIN)
                              ~~~~ ^
      

        Issue Links

          Activity

          Hide
          xgen-internal-githook Githook User added a comment -

          Author:

          {u'username': u'daveh86', u'name': u'David Hows', u'email': u'howsdav@gmail.com'}

          Message: WT-2148 Change how encoding functions are written to avoid -Wshift-negative-value
          Branch: develop
          https://github.com/wiredtiger/wiredtiger/commit/e5c911409235008017ed91aded57921bf997ae20

          Show
          xgen-internal-githook Githook User added a comment - Author: {u'username': u'daveh86', u'name': u'David Hows', u'email': u'howsdav@gmail.com'} Message: WT-2148 Change how encoding functions are written to avoid -Wshift-negative-value Branch: develop https://github.com/wiredtiger/wiredtiger/commit/e5c911409235008017ed91aded57921bf997ae20
          Hide
          xgen-internal-githook Githook User added a comment -

          Author:

          {u'username': u'michaelcahill', u'name': u'Michael Cahill', u'email': u'michael.cahill@mongodb.com'}

          Message: Merge pull request #2227 from wiredtiger/WT-2148

          WT-2148 Change encoding functions to avoid -Wshift-negative-value
          Branch: develop
          https://github.com/wiredtiger/wiredtiger/commit/62998cecd72d83799d8e8b20c631fc3a05a2aa7f

          Show
          xgen-internal-githook Githook User added a comment - Author: {u'username': u'michaelcahill', u'name': u'Michael Cahill', u'email': u'michael.cahill@mongodb.com'} Message: Merge pull request #2227 from wiredtiger/ WT-2148 WT-2148 Change encoding functions to avoid -Wshift-negative-value Branch: develop https://github.com/wiredtiger/wiredtiger/commit/62998cecd72d83799d8e8b20c631fc3a05a2aa7f
          Hide
          xgen-internal-githook Githook User added a comment -

          Author:

          {u'username': u'michaelcahill', u'name': u'Michael Cahill', u'email': u'michael.cahill@mongodb.com'}

          Message: Merge pull request #2227 from wiredtiger/WT-2148

          WT-2148 Change encoding functions to avoid -Wshift-negative-value
          Branch: develop
          https://github.com/wiredtiger/wiredtiger/commit/62998cecd72d83799d8e8b20c631fc3a05a2aa7f

          Show
          xgen-internal-githook Githook User added a comment - Author: {u'username': u'michaelcahill', u'name': u'Michael Cahill', u'email': u'michael.cahill@mongodb.com'} Message: Merge pull request #2227 from wiredtiger/ WT-2148 WT-2148 Change encoding functions to avoid -Wshift-negative-value Branch: develop https://github.com/wiredtiger/wiredtiger/commit/62998cecd72d83799d8e8b20c631fc3a05a2aa7f

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since reply:
                1 year, 38 weeks, 5 days ago
                Date of 1st Reply: