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

non-portable char vs integer comparisons

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1.5
    • Fix Version/s: 2.1.8
    • Component/s: Portability
    • Labels:
      None
    • Environment:

      ARM/Maemo with gcc 4.2.1

      Description

      Several char comparisons fail with "always true" or "always false" on this platform:

      iocore/cluster/ClusterHandlerBase.cc line 148 (is this needed? Under what circumstances can size_index be negative but not -1)

      iocore/cluster/ClusterProcessor.cc lines 209/210/212 (as above?)

      lib/ts/ParseRules.h line 193 and 253 (platform is fine if we test bitwise-AND 0x80 for negativity)

      proxy/mgmt2/cluster/ClusterCom.cc line 2134 (casting EOF to char fixes it)

      proxy/mgmt2/preparse/IPRange.cc line 112 (as above)

        Attachments

        1. TS-629-jp-1.patch
          3 kB
          John Plevyak

          Activity

            People

            • Assignee:
              nick@webthing.com Nick Kew
              Reporter:
              nick@webthing.com Nick Kew
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: