Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-4484

libwebhdfs compilation broken with gcc 4.6.2

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1.0-beta
    • Fix Version/s: 2.1.0-beta
    • Component/s: None
    • Labels:
      None
    • Environment:

      OpenSUSE 12.1, x86_64, gcc 4.6.2

    • Target Version/s:
    • Hadoop Flags:
      Reviewed

      Description

      libwebhdfs doesn't compile with gcc 4.6.2.

      /home/cmccabe/hadoop1/hadoop-hdfs-project/hadoop-hdfs/src/contrib/libwebhdfs/src/test_libwebhdfs_ops.c: In function ‘main’:
      /home/cmccabe/hadoop1/hadoop-hdfs-project/hadoop-hdfs/src/contrib/libwebhdfs/src/test_libwebhdfs_ops.c:260:9: error: ‘for’ loop initial declarations are only allowed in C99 mode
      /home/cmccabe/hadoop1/hadoop-hdfs-project/hadoop-hdfs/src/contrib/libwebhdfs/src/test_libwebhdfs_ops.c:260:9: note: use option -std=c99 or -std=gnu99 to compile your code
      /home/cmccabe/hadoop1/hadoop-hdfs-project/hadoop-hdfs/src/contrib/libwebhdfs/src/test_libwebhdfs_ops.c:284:13: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 3 has type ‘tOffset’ [-Wformat]
      /home/cmccabe/hadoop1/hadoop-hdfs-project/hadoop-hdfs/src/contrib/libwebhdfs/src/test_libwebhdfs_ops.c:285:13: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 3 has type ‘tOffset’ [-Wformat]
      /home/cmccabe/hadoop1/hadoop-hdfs-project/hadoop-hdfs/src/contrib/libwebhdfs/src/test_libwebhdfs_ops.c:308:17: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 3 has type ‘tOffset’ [-Wformat]
      /home/cmccabe/hadoop1/hadoop-hdfs-project/hadoop-hdfs/src/contrib/libwebhdfs/src/test_libwebhdfs_ops.c:309:17: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 3 has type ‘tOffset’ [-Wformat]
      

        Attachments

        1. HDFS-4484.001.patch
          3 kB
          Colin McCabe

          Issue Links

            Activity

              People

              • Assignee:
                cmccabe Colin McCabe
                Reporter:
                cmccabe Colin McCabe
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: