[
https://issues.apache.org/jira/browse/HDFS-3673?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13415715#comment-13415715
]
Andy Isaacson commented on HDFS-3673:
-------------------------------------
{code}
- if (fs == NULL) {
+ if (jFS == NULL) {
...
- (*env)->DeleteGlobalRef(env, fs);
+ (*env)->DeleteGlobalRef(env, jFS);
{code}
This change isn't described in your comment, and doesn't appear to be an
improvement. Please revert.
{code}
+ fprintf(stderr, "getJNIEnv: OOM allocating %Zd bytes\n",
{code}
{{printf(3)}} says we should use z instead of Z:
{noformat}
z A following integer conversion corresponds to a size_t or ssize_t
argument.
(Linux libc5 has Z with this meaning. Don't use it.)
{noformat}
{code}
- fprintf("pthread_key_create failed with error %d\n", ret);
+ fprintf(stderr, "pthread_key_create failed with error %d\n", ret);
{code}
Should probably include the function name, or maybe {{__FILE__}} {{__LINE__}},
in the error message.
> libhdfs: fix some compiler warnings
> -----------------------------------
>
> Key: HDFS-3673
> URL: https://issues.apache.org/jira/browse/HDFS-3673
> Project: Hadoop HDFS
> Issue Type: Bug
> Affects Versions: 2.1.0-alpha
> Reporter: Colin Patrick McCabe
> Assignee: Colin Patrick McCabe
> Priority: Minor
> Attachments: HDFS-3673.001.patch
>
>
> Fix some compiler warnings. Some of these are misuses of fprintf (forgetting
> the FILE* parameter), const mismatch warnings, format specifier warnings.
--
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