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

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

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • WT2.7.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      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)
                              ~~~~ ^
      

            Assignee:
            david.hows David Hows
            Reporter:
            mathias@mongodb.com Mathias Stearn
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: