You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-issues@hadoop.apache.org by "Todd Lipcon (JIRA)" <ji...@apache.org> on 2010/08/27 02:27:53 UTC

[jira] Created: (MAPREDUCE-2035) Enable -Wall and fix warnings in task-controller build

Enable -Wall and fix warnings in task-controller build
------------------------------------------------------

                 Key: MAPREDUCE-2035
                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-2035
             Project: Hadoop Map/Reduce
          Issue Type: Improvement
          Components: task-controller
    Affects Versions: 0.22.0
            Reporter: Todd Lipcon
            Assignee: Todd Lipcon
            Priority: Minor


Enabling -Wall shows a bunch of warnings. We should enable them and then fix them.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (MAPREDUCE-2035) Enable -Wall and fix warnings in task-controller build

Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MAPREDUCE-2035?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Todd Lipcon updated MAPREDUCE-2035:
-----------------------------------

    Attachment: mapreduce-2035-toreview.txt

Here's the patch for review.
- Enables -Wall and -Werror (if peoplpe think -Werror is too much we can take it out, but it's good to prevent them from sneaking in)
- Renames configuration.h.in to configuration.h and gets rid of the #undef HADOOP_CONF_DIR
- Fixes configure.ac to generate the #undef HADOOP_CONF_DIR as part of autoheader
- Run autoscan/autoheader to generate config.h.in. Clean up configure.ac to fix missing AC macro warnings.
- Fixes warnings in code and in tests

This patch doesn't include the generated code. Will upload one with the generated code as well.

> Enable -Wall and fix warnings in task-controller build
> ------------------------------------------------------
>
>                 Key: MAPREDUCE-2035
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-2035
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>          Components: task-controller
>    Affects Versions: 0.22.0
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>            Priority: Minor
>         Attachments: mapreduce-2035-toreview.txt
>
>
> Enabling -Wall shows a bunch of warnings. We should enable them and then fix them.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (MAPREDUCE-2035) Enable -Wall and fix warnings in task-controller build

Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MAPREDUCE-2035?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Todd Lipcon updated MAPREDUCE-2035:
-----------------------------------

    Attachment: mapreduce-2035.txt

Same diff but including all the generated code changes. This is from autoconf 2.59 on RHEL5

> Enable -Wall and fix warnings in task-controller build
> ------------------------------------------------------
>
>                 Key: MAPREDUCE-2035
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-2035
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>          Components: task-controller
>    Affects Versions: 0.22.0
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>            Priority: Minor
>         Attachments: mapreduce-2035-toreview.txt, mapreduce-2035.txt
>
>
> Enabling -Wall shows a bunch of warnings. We should enable them and then fix them.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MAPREDUCE-2035) Enable -Wall and fix warnings in task-controller build

Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAPREDUCE-2035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12903488#action_12903488 ] 

Todd Lipcon commented on MAPREDUCE-2035:
----------------------------------------

Is -Wall really compiler-specific? Do you have some autoconf foo to share to make this more portable?

Also, given that this is the *linux* task-controller, don't you think it's fair to assume GCC for now, until someone takes up the task of making it run on other systems?

> Enable -Wall and fix warnings in task-controller build
> ------------------------------------------------------
>
>                 Key: MAPREDUCE-2035
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-2035
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>          Components: task-controller
>    Affects Versions: 0.22.0
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>            Priority: Minor
>         Attachments: mapreduce-2035-toreview.txt, mapreduce-2035.txt
>
>
> Enabling -Wall shows a bunch of warnings. We should enable them and then fix them.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (MAPREDUCE-2035) Enable -Wall and fix warnings in task-controller build

Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MAPREDUCE-2035?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Todd Lipcon updated MAPREDUCE-2035:
-----------------------------------

    Status: Patch Available  (was: Open)

> Enable -Wall and fix warnings in task-controller build
> ------------------------------------------------------
>
>                 Key: MAPREDUCE-2035
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-2035
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>          Components: task-controller
>    Affects Versions: 0.22.0
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>            Priority: Minor
>         Attachments: mapreduce-2035-toreview.txt, mapreduce-2035.txt
>
>
> Enabling -Wall shows a bunch of warnings. We should enable them and then fix them.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MAPREDUCE-2035) Enable -Wall and fix warnings in task-controller build

Posted by "Allen Wittenauer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAPREDUCE-2035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12904077#action_12904077 ] 

Allen Wittenauer commented on MAPREDUCE-2035:
---------------------------------------------

Surprisingly, there are very few compiler agnostic options.  [In fact, the only two that I can think of are -c and -o, and I'm sure something somewhere breaks those!]  Removing compiler specific flags from even autoconf files is a pain when doing portability work because they tend to sneak in everywhere.

In this particular case, I'm fairly certain you can test for $GCC = yes.   For example, for a local patch I have to fix -Wall for g++ I do the following:

# turn -Wall and -strict-prototypes for G++
if test "$GXX" = yes; then
  CXXFLAGS="$CXXFLAGS -Wall -strict-prototypes"
else
  # SunStudio requires -features=extensions
  AC_CACHE_CHECK([whether $CXX accepts -features=extensions],
    [ha_cv_cxx__features],
    [save_CXXFLAGS=$CXXFLAGS
      CXXFLAGS="$CXXFLAGS -features=extensions"
      AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
                  [ha_cv_cxx__features=yes],
                  [ha_cv_cxx__features=no])
      test "$ha_cv_cxx__features" = no && CXXFLAGS=$save_CXXFLAGS
    ])
fi



> Enable -Wall and fix warnings in task-controller build
> ------------------------------------------------------
>
>                 Key: MAPREDUCE-2035
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-2035
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>          Components: task-controller
>    Affects Versions: 0.22.0
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>            Priority: Minor
>         Attachments: mapreduce-2035-toreview.txt, mapreduce-2035.txt
>
>
> Enabling -Wall shows a bunch of warnings. We should enable them and then fix them.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MAPREDUCE-2035) Enable -Wall and fix warnings in task-controller build

Posted by "Allen Wittenauer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAPREDUCE-2035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12903398#action_12903398 ] 

Allen Wittenauer commented on MAPREDUCE-2035:
---------------------------------------------


-1

Compiler specific flags should get added after compiler detection.  

> Enable -Wall and fix warnings in task-controller build
> ------------------------------------------------------
>
>                 Key: MAPREDUCE-2035
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-2035
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>          Components: task-controller
>    Affects Versions: 0.22.0
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>            Priority: Minor
>         Attachments: mapreduce-2035-toreview.txt, mapreduce-2035.txt
>
>
> Enabling -Wall shows a bunch of warnings. We should enable them and then fix them.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.