[ 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.