Uploaded image for project: 'serf'
  1. serf
  2. SERF-156

test_buckets.c gcc compile error on non-win32 (invalid // comment)

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • None

    Description

      What steps will reproduce the problem?
      1. Compile serf-1.3.8 (scons)
      2. Run test suite (scons check) using gcc on Linux (or non-win32 platform)

      What is the expected output? What do you see instead?
      The test suite code should compile without errors (to allow the test suite to execute).

      What version of the product are you using? On what operating system?
      serf 1.3.8, CentOS Linux 6.5 x86_64, gcc 4.4.7

      Please provide any additional information below.

      1. CFLAGS '-std=c89' is set by SConstruct for non-win32 platforms
      if sys.platform != 'win32':

          1. gcc only. figure out appropriate test / better way to check these
          2. flags, and check for gcc.
            env.Append(CFLAGS='-std=c89')

      2. test/test_buckets.c use a C++ style comment "//" not valid until C99 to comment out a line of code
      1237 // buf_size = orig_len + (orig_len / 1000) + 12;

      The 1.3.x branch received this from trunk r2419.

      3. scons check (command output)
      ...
      test/test_buckets.c: In function 'deflate_compress':
      test/test_buckets.c:1237: error: expected expression before '/' token
      test/test_buckets.c: In function 'create_gzip_deflate_bucket':
      test/test_buckets.c:1436: warning: ISO C90 forbids mixed declarations and code
      test/test_buckets.c: In function 'test_deflate_4GBplus_buckets':
      test/test_buckets.c:1559: warning: integer overflow in expression
      scons: *** [test/test_buckets.o] Error 1
      scons: building terminated because of errors.

      Original issue reported by bryan.shake

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            serf-importer Serf Importer
            serf-importer Serf Importer
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment