Avoid array-bounds warnings with gcc 7

XMLWordPrintableJSON

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

      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 (Inactive)
            Reporter:
            Michael Cahill (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: