[
https://issues.apache.org/jira/browse/HADOOP-10810?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14060997#comment-14060997
]
Colin Patrick McCabe commented on HADOOP-10810:
-----------------------------------------------
Thanks for looking at this, Chris.
{code}
for (i = 0; i < used_size; i++) {
- pollfd = sd->pollfd + i;
- if (pollfd->fd == fd) break;
+ if ((sd->pollfd + i)->fd == fd) {
+ pollfd = sd->pollfd + i;
+ break;
+ }
}
- if (i == used_size) {
+ if (pollfd == NULL) {
{code}
I don't understand the motivation behind this, can you explain? Also you would
probably express this as {{sd->pollfd\[i\]->fd}}.
The rest looks good. You might want to try clang if you've got that. It often
reveals warnings that gcc doesn't (and vice versa)
> Clean up native code compilation warnings.
> ------------------------------------------
>
> Key: HADOOP-10810
> URL: https://issues.apache.org/jira/browse/HADOOP-10810
> Project: Hadoop Common
> Issue Type: Bug
> Components: native
> Affects Versions: 3.0.0, 2.5.0
> Reporter: Chris Nauroth
> Assignee: Chris Nauroth
> Priority: Minor
> Attachments: HADOOP-10810.1.patch
>
>
> There are several compilation warnings coming from the native code on both
> Linux and Windows.
--
This message was sent by Atlassian JIRA
(v6.2#6252)