|
From: <sv...@va...> - 2015-05-25 14:43:57
|
Author: rhyskidd
Date: Mon May 25 15:43:47 2015
New Revision: 15288
Log:
Address clang compiler warnings on OS X.
Modified:
trunk/coregrind/m_syswrap/syswrap-darwin.c
Modified: trunk/coregrind/m_syswrap/syswrap-darwin.c
==============================================================================
--- trunk/coregrind/m_syswrap/syswrap-darwin.c (original)
+++ trunk/coregrind/m_syswrap/syswrap-darwin.c Mon May 25 15:43:47 2015
@@ -3597,7 +3597,7 @@
PRE(mkfifo)
{
*flags |= SfMayBlock;
- PRINT("mkfifo ( %#lx(%s), %ld )",ARG1,(char *)ARG1,(vki_mode_t)ARG2);
+ PRINT("mkfifo ( %#lx(%s), %lld )",ARG1,(char *)ARG1,(ULong)ARG2);
PRE_REG_READ2(long, "mkfifo", const char *, path, vki_mode_t, mode);
PRE_MEM_RASCIIZ( "mkfifo(path)", ARG1 );
}
@@ -3610,7 +3610,7 @@
SET_STATUS_Failure( VKI_EMFILE );
} else {
if (VG_(clo_track_fds))
- ML_(record_fd_open_with_given_name)(tid, RES, (Char*)ARG1);
+ ML_(record_fd_open_with_given_name)(tid, RES, (HChar*)ARG1);
}
}
|
|
From: Florian K. <fl...@ei...> - 2015-05-25 18:51:50
|
On 25.05.2015 16:43, sv...@va... wrote:
> Modified: trunk/coregrind/m_syswrap/syswrap-darwin.c
> ==============================================================================
> --- trunk/coregrind/m_syswrap/syswrap-darwin.c (original)
> +++ trunk/coregrind/m_syswrap/syswrap-darwin.c Mon May 25 15:43:47 2015
> @@ -3597,7 +3597,7 @@
> PRE(mkfifo)
> {
> *flags |= SfMayBlock;
> - PRINT("mkfifo ( %#lx(%s), %ld )",ARG1,(char *)ARG1,(vki_mode_t)ARG2);
> + PRINT("mkfifo ( %#lx(%s), %lld )",ARG1,(char *)ARG1,(ULong)ARG2);
It's interesting that this change fixes the warning. Because the format
to be used for unsigned long long should be %llu.
GCC doesn't catch this format mismatch either and I'm wondering why that is.
Florian
|