Uploaded image for project: 'Traffic Server'
  1. Traffic Server
  2. TS-2959

Compiler warnings from gcc 4.9.1

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 4.2.3, 5.2.0
    • Core, DNS
    • None

    Description

      We get:

      In file included from ../../iocore/hostdb/P_HostDB.h:47:0,
                       from ../../proxy/Main.cc:63:
      ../../iocore/hostdb/P_MultiCache.h: In member function ‘void MultiCache<C>::rebuild_element(int, char*, RebuildMC&) [with C = HostDBInfo]’:
      ../../iocore/hostdb/P_MultiCache.h:468:23: error: array subscript is above array bounds [-Werror=array-bounds]
         char *offset = data + level_offset[level] + bucketsize[level] * bucket;
                             ^
      ../../iocore/hostdb/P_MultiCache.h:468:65: error: array subscript is above array bounds [-Werror=array-bounds]
         char *offset = data + level_offset[level] + bucketsize[level] * bucket;
                                                                       ^
      ../../iocore/hostdb/P_MultiCache.h:487:29: error: array subscript is above array bounds [-Werror=array-bounds]
         for (block = b; block < b + elements[level]; block++) {
                                   ^
      ../../iocore/hostdb/P_MultiCache.h:509:39: error: array subscript is above array bounds [-Werror=array-bounds]
             if (hits > ((max_hits / 2) + 1) * elements[level])
                                             ^
      ../../iocore/hostdb/P_MultiCache.h:511:33: error: array subscript is above array bounds [-Werror=array-bounds]
             for (block = b; block < b + elements[level]; block++) {
                                       ^
      ../../iocore/hostdb/P_MultiCache.h:468:23: error: array subscript is above array bounds [-Werror=array-bounds]
         char *offset = data + level_offset[level] + bucketsize[level] * bucket;
                             ^
      ../../iocore/hostdb/P_MultiCache.h:468:65: error: array subscript is above array bounds [-Werror=array-bounds]
         char *offset = data + level_offset[level] + bucketsize[level] * bucket;
                                                                       ^
      ../../iocore/hostdb/P_MultiCache.h:487:29: error: array subscript is above array bounds [-Werror=array-bounds]
         for (block = b; block < b + elements[level]; block++) {
                                   ^
      ../../iocore/hostdb/P_MultiCache.h:509:39: error: array subscript is above array bounds [-Werror=array-bounds]
             if (hits > ((max_hits / 2) + 1) * elements[level])
                                             ^
      ../../iocore/hostdb/P_MultiCache.h:511:33: error: array subscript is above array bounds [-Werror=array-bounds]
             for (block = b; block < b + elements[level]; block++) {
                                       ^
      ../../iocore/hostdb/P_MultiCache.h:552:31: error: array subscript is above array bounds [-Werror=array-bounds]
           for (block = b; block < b + elements[level]; block++) {
                                     ^
      ../../iocore/hostdb/P_MultiCache.h:558:31: error: array subscript is above array bounds [-Werror=array-bounds]
           for (block = b; block < b + elements[level]; block++)
                                     ^
      ../../iocore/hostdb/P_MultiCache.h:552:31: error: array subscript is above array bounds [-Werror=array-bounds]
           for (block = b; block < b + elements[level]; block++) {
                                     ^
      ../../iocore/hostdb/P_MultiCache.h:558:31: error: array subscript is above array bounds [-Werror=array-bounds]
           for (block = b; block < b + elements[level]; block++)
                                     ^
      

      Attachments

        1. ts-2959.diff
          0.7 kB
          Susan Hinrichs

        Issue Links

          Activity

            People

              psudaemon Phil Sorber
              zwoop Leif Hedstrom
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: