ZooKeeper
  1. ZooKeeper
  2. ZOOKEEPER-738

zookeeper.jute.h fails to compile with -pedantic

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.3.0
    • Fix Version/s: 3.3.1, 3.4.0
    • Component/s: c client
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      /home/y/include/zookeeper/zookeeper.jute.h:96: error: extra semicolon
      /home/y/include/zookeeper/zookeeper.jute.h:158: error: extra semicolon
      /home/y/include/zookeeper/zookeeper.jute.h:288: error: extra semicolon

      the code generator needs to be updated to not output a naked semi

      1. semi.patch
        1 kB
        Jozef Hatala

        Activity

        Hide
        Jozef Hatala added a comment -

        The attached patch removes the extra semicolon after the call to JType.genCDecl (which comes with its own semicolon already):

        src/java/main/org/apache/jute/compiler/JType.java:
        52 String genCDecl(String name)

        { 53 return " " + mCName + " "+name+";\n"; 54 }

        The attached diff is against http://svn.apache.org/repos/asf/hadoop/zookeeper/trunk at revision 932666 specifically.

        (Regenerated the files like this: rm -rf src/

        {c,java}

        /generated/ && ant compile_jute)

        Testing done: I diff:ed the C and Java files that "ant compile_jute" generates in the ZK tree with and without this patch applied, and I confirmed that the only difference between the two is that with the patch applied the extra semicolon is not present any more. (Diff:ed like this: diff -ru src

        {.orig,}

        /c/generated/)

        Show
        Jozef Hatala added a comment - The attached patch removes the extra semicolon after the call to JType.genCDecl (which comes with its own semicolon already): src/java/main/org/apache/jute/compiler/JType.java: 52 String genCDecl(String name) { 53 return " " + mCName + " "+name+";\n"; 54 } The attached diff is against http://svn.apache.org/repos/asf/hadoop/zookeeper/trunk at revision 932666 specifically. (Regenerated the files like this: rm -rf src/ {c,java} /generated/ && ant compile_jute) Testing done: I diff:ed the C and Java files that "ant compile_jute" generates in the ZK tree with and without this patch applied, and I confirmed that the only difference between the two is that with the patch applied the extra semicolon is not present any more. (Diff:ed like this: diff -ru src {.orig,} /c/generated/)
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12442124/semi.patch
        against trunk revision 936624.

        +1 @author. The patch does not contain any @author tags.

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no tests are needed for this patch.

        +1 javadoc. The javadoc tool did not generate any warning messages.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 findbugs. The patch does not introduce any new Findbugs warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        -1 core tests. The patch failed core unit tests.

        +1 contrib tests. The patch passed contrib unit tests.

        Test results: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/67/testReport/
        Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/67/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Console output: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/67/console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12442124/semi.patch against trunk revision 936624. +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no tests are needed for this patch. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. -1 core tests. The patch failed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/67/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/67/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/67/console This message is automatically generated.
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12442124/semi.patch
        against trunk revision 936624.

        +1 @author. The patch does not contain any @author tags.

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no tests are needed for this patch.

        +1 javadoc. The javadoc tool did not generate any warning messages.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 findbugs. The patch does not introduce any new Findbugs warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 core tests. The patch passed core unit tests.

        +1 contrib tests. The patch passed contrib unit tests.

        Test results: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h8.grid.sp2.yahoo.net/147/testReport/
        Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h8.grid.sp2.yahoo.net/147/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Console output: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h8.grid.sp2.yahoo.net/147/console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12442124/semi.patch against trunk revision 936624. +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no tests are needed for this patch. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h8.grid.sp2.yahoo.net/147/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h8.grid.sp2.yahoo.net/147/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h8.grid.sp2.yahoo.net/147/console This message is automatically generated.
        Hide
        Patrick Hunt added a comment -

        +1, looks good, thanks Jozef!

        Show
        Patrick Hunt added a comment - +1, looks good, thanks Jozef!

          People

          • Assignee:
            Jozef Hatala
            Reporter:
            Patrick Hunt
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development