hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alan Burlison (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-12560) Fix sprintf warnings in {{DomainSocket.c}} introduced by HADOOP-12344
Date Mon, 09 Nov 2015 19:37:11 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-12560?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14997216#comment-14997216
] 

Alan Burlison commented on HADOOP-12560:
----------------------------------------

Yes, please feel free to reassign.

For 32/64 bit portability you will probably need to cast to the appropriate bitness-specific
typedef use the PRId64 macro in the format string. There are existing examples in the code
you can use as templates, e.g. https://github.com/apache/hadoop/search?q=PRId64

> Fix sprintf warnings in {{DomainSocket.c}} introduced by HADOOP-12344
> ---------------------------------------------------------------------
>
>                 Key: HADOOP-12560
>                 URL: https://issues.apache.org/jira/browse/HADOOP-12560
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: native
>    Affects Versions: 2.8.0
>            Reporter: Colin Patrick McCabe
>            Assignee: Alan Burlison
>
> Fix sprintf warnings in {{DomainSocket.c}} introduced by HADOOP-12344
> {code}
>      [exec] op/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/net/unix/DomainSocket.c:488:10:
warning: format ‘%ld’ expects argument of type ‘long int’, but argument 6 has type
‘long long int’ [-Wformat=]
>      [exec]           check, path, mode, (long long)st.st_uid, (long long)st.st_gid,
check);
>      [exec]           ^
>      [exec] /pool/home/alanbur/bigdata/hadoop/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/net/unix/DomainSocket.c:488:10:
warning: format ‘%ld’ expects argument of type ‘long int’, but argument 7 has type
‘long long int’ [-Wformat=]
>      [exec] /pool/home/alanbur/bigdata/hadoop/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/net/unix/DomainSocket.c:500:10:
warning: format ‘%ld’ expects argument of type ‘long int’, but argument 6 has type
‘long long int’ [-Wformat=]
>      [exec]           check, check);
>      [exec]           ^
>      [exec] /pool/home/alanbur/bigdata/hadoop/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/net/unix/DomainSocket.c:500:10:
warning: format ‘%ld’ expects argument of type ‘long int’, but argument 7 has type
‘long long int’ [-Wformat=]
>      [exec] /pool/home/alanbur/bigdata/hadoop/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/net/unix/DomainSocket.c:513:10:
warning: format ‘%ld’ expects argument of type ‘long int’, but argument 6 has type
‘long long int’ [-Wformat=]
>      [exec]           (long long)uid, check, (long long)uid, check);
>      [exec]           ^
>      [exec] /pool/home/alanbur/bigdata/hadoop/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/net/unix/DomainSocket.c:513:10:
warning: format ‘%ld’ expects argument of type ‘long int’, but argument 7 has type
‘long long int’ [-Wformat=]
>      [exec] /pool/home/alanbur/bigdata/hadoop/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/net/unix/DomainSocket.c:513:10:
warning: format ‘%ld’ expects argument of type ‘long int’, but argument 8 has type
‘long long int’ [-Wformat=]
>      [exec] /pool/home/alanbur/bigdata/hadoop/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/net/unix/DomainSocket.c:513:10:
warning: format ‘%ld’ expects argument of type ‘long int’, but argument 10 has type
‘long long int’ [-Wformat=]
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message