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

Avoid array-bounds warnings with gcc 7

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 3.5.13, WT3.0.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Storage 2017-09-11

      A strict build with gcc version 7.1.1 20170622 emits errors such as:

      In file included from ../../../src/include/wt_internal.h:374:0,
                       from ../../../test/utility/test_util.h:28,
                       from ../../../test/packing/intpack-test.c:29:
      ../../../test/packing/intpack-test.c: In function 'main':
      ../../../src/include/intpack.i:153:18: error: array subscript is above array bounds [-Werror=array-bounds]
         x = (x << 8) | *p++;
                        ^~~~
      

            Assignee:
            michael.cahill@mongodb.com Michael Cahill (Inactive)
            Reporter:
            michael.cahill@mongodb.com Michael Cahill (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: