osaf/services/saf/logsv/lgs/lgs_stream.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


The function log_stream_write() currently uses %ld
to print size_t.
This leads the following warning:
cc1: warnings being treated as errors
lgs_stream.c: In function ‘log_stream_write’:
lgs_stream.c:895: error: format ‘%ld’ expects type ‘long int’, but argument 6 
has type ‘size_t’

This patch uses the %z length modifier for printing size_t

diff --git a/osaf/services/saf/logsv/lgs/lgs_stream.c 
b/osaf/services/saf/logsv/lgs/lgs_stream.c
--- a/osaf/services/saf/logsv/lgs/lgs_stream.c
+++ b/osaf/services/saf/logsv/lgs/lgs_stream.c
@@ -892,7 +892,7 @@ int log_stream_write(log_stream_t *strea
                /* Handle partial writes */
                bytes_written += rc;
                if (bytes_written < count) {
-                       TRACE("Partial write. bytes_written = %d, count = %ld",
+                       TRACE("Partial write. bytes_written = %d, count = %zu",
                                        bytes_written, count);
                        goto retry;
                }
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to