[
https://issues.apache.org/jira/browse/HADOOP-8686?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Colin Patrick McCabe updated HADOOP-8686:
-----------------------------------------
Attachment: HADOOP-8686.002.patch
* SnappyCompressor: fix a case where we were passing in a pointer to a
4-byte value rather than a pointer to a (usually) 8-byte value.
* fix LZ4_compress prototype.
* don't put junk on the line after an #endif -- it triggers a compiler
warning.
* NativeIO: #define _GNU_SOURCE so that sync_file_range is not an
implicitly declared function on Linux.
* Java_org_apache_hadoop_io_compress_snappy_SnappyCompressor_initIDs:
don't leak memory on error.
* NativeIO: throw_ioe: we were using strerror_r, but assuming that it
returned an int. However, it returns a char* in GNU glibc.
(Yes, there was an #ifdef that was supposed to prevent this, but it was
busted.) Instead, just use sys_errlist directly if we have an errno
that is in range; otherwise come up with our own message. This should
work on all platforms.
* move a few declarations to the tops of functions. This was done so
that error handling using goto didn't cause those variables to be used
with undefined values. (This would happen if you used goto from a
position before a C99-style variable declaration.)
> hadoop-common: fix warnings in native code
> ------------------------------------------
>
> Key: HADOOP-8686
> URL: https://issues.apache.org/jira/browse/HADOOP-8686
> Project: Hadoop Common
> Issue Type: Bug
> Components: native
> Affects Versions: 2.2.0-alpha
> Reporter: Colin Patrick McCabe
> Assignee: Colin Patrick McCabe
> Priority: Minor
> Attachments: HADOOP-8686.002.patch
>
>
> Fix warnings about const-correctness, improper conversion between pointers of
> different sizes, implicit declaration of sync_file_range, variables being
> used with uninitialized values, and so forth in the hadoop-common native code.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira