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

fix DBG macros to not generate warnings from GCC 4.9

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 4.2.2, 5.0.0
    • Build
    • None

    Description

      Fedora 'rawhide' is using gcc 4.9 as default compiler. During build of trafficserver 4.2.1 I had lot of extra output from gcc due to DBG macros:

      -----------------------------------------------------------------------------------
      In file included from ../../lib/ts/ink_time.h:38:0,
      from ../../lib/ts/ink_align.h:28,
      from ../../lib/ts/libts.h:46,
      from P_EventSystem.h:34,
      from IOBuffer.cc:28:
      ../../lib/ts/ink_defs.h:147:56: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
      #define FDBG if (debug_level==1) printf("debug "_FILE":%d %s : entered\n" ,LINE,FUNCTION_)
      ^
      ../../lib/ts/ink_defs.h:148:56: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
      #define DBG(s) if (debug_level==1) printf("debug "_FILE":%d %s :" s ,LINE,FUNCTION_)
      ^
      ../../lib/ts/ink_defs.h:149:56: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
      #define DBG1(s,a) if (debug_level==1) printf("debug "_FILE":%d %s :" s ,LINE,FUNCTION_, a)
      ^
      ../../lib/ts/ink_defs.h:150:56: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
      #define DBG2(s,a1,a2) if (debug_level==1) printf("debug "_FILE":%d %s :" s ,LINE,FUNCTION_, a1,a2)
      ^
      ../../lib/ts/ink_defs.h:151:56: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
      #define DBG3(s,a1,a2,a3) if (debug_level==1) printf("debug "_FILE":%d %s :" s ,LINE,FUNCTION_, a1,a2,a3)
      ^
      ../../lib/ts/ink_defs.h:152:56: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
      #define DBG4(s,a1,a2,a3,a4) if (debug_level==1) printf("debug "_FILE":%d %s :" s ,LINE,FUNCTION_, a1,a2,a3,a4)
      -----------------------------------------------------------------------------------

      I have a fix for that.

      Attachments

        1. trafficserver-remove-dbg-macros.patch
          1 kB
          Marcin Juszkiewicz
        2. trafficserver-fix-dbg.patch
          2 kB
          Marcin Juszkiewicz

        Activity

          People

            psudaemon Phil Sorber
            hrw-redhat Marcin Juszkiewicz
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: