[dvblast-devel] [PATCH 04/20] Fix format string warnings on 64 bit compilation related to ssize_t.
Georgi Chorbadzhiyski
gf at unixsol.org
Mon Sep 5 09:52:39 CEST 2011
This patch fixes compilation warnings related to ssize_t when
dvblast is compiled on 64 bit machine. The fixed warnings are:
comm.c: In function "comm_Read":
comm.c:86:18: warning: format "%d" expects type "int", but argument 3 has type "ssize_t"
comm.c:168:14: warning: format "%d" expects type "int", but argument 5 has type "ssize_t"
dvblastctl.c: In function "main":
dvblastctl.c:248:18: warning: format "%d" expects type "int", but argument 3 has type "ssize_t"
---
comm.c | 4 ++--
dvblastctl.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/comm.c b/comm.c
index 1eafddc..a59fe3f 100644
--- a/comm.c
+++ b/comm.c
@@ -82,7 +82,7 @@ void comm_Read( void )
(struct sockaddr *)&sun_client, &sun_length );
if ( i_size < COMM_HEADER_SIZE )
{
- msg_Err( NULL, "cannot read comm socket (%d:%s)\n", i_size,
+ msg_Err( NULL, "cannot read comm socket (%zd:%s)\n", i_size,
strerror(errno) );
return;
}
@@ -164,7 +164,7 @@ void comm_Read( void )
p_answer[1] = i_answer;
p_answer[2] = 0;
p_answer[3] = 0;
- msg_Dbg( NULL, "answering %d to %d with size %d", i_answer, i_command,
+ msg_Dbg( NULL, "answering %d to %d with size %zd", i_answer, i_command,
i_answer_size );
if ( sendto( i_comm_fd, p_answer, i_answer_size + COMM_HEADER_SIZE, 0,
diff --git a/dvblastctl.c b/dvblastctl.c
index 4dd5ecb..5cbf600 100644
--- a/dvblastctl.c
+++ b/dvblastctl.c
@@ -244,7 +244,7 @@ int main( int i_argc, char **ppsz_argv )
unlink( psz_client_socket );
if ( i_size < COMM_HEADER_SIZE )
{
- msg_Err( NULL, "cannot recv comm socket (%d:%s)", i_size,
+ msg_Err( NULL, "cannot recv comm socket (%zd:%s)", i_size,
strerror(errno) );
exit(255);
}
--
1.7.5.1
More information about the dvblast-devel
mailing list