PATCH: server/trace.c cleanup (RETRY)
Gerald Pfeifer
gerald at pfeifer.com
Mon Sep 29 12:38:47 CDT 2003
[ 2nd attempt. I really don't see any viable alternative to these
casts; keeping the status quo certainly seems bad. ]
The patch below properly fixes the following warnings in server/trace.c:
trace.c: In function `dump_get_thread_info_reply':
trace.c:545: warning: long int format, time_t arg (arg 3)
trace.c:546: warning: long int format, time_t arg (arg 3)
trace.c: In function `dump_set_file_time_request':
trace.c:873: warning: long int format, time_t arg (arg 3)
trace.c:874: warning: long int format, time_t arg (arg 3)
trace.c: In function `dump_get_file_info_reply':
trace.c:896: warning: long int format, time_t arg (arg 3)
trace.c:897: warning: long int format, time_t arg (arg 3)
trace.c:898: warning: long int format, time_t arg (arg 3)
trace.c: In function `dump_create_key_request':
trace.c:1510: warning: long int format, time_t arg (arg 3)
trace.c: In function `dump_enum_key_reply':
trace.c:1558: warning: long int format, time_t arg (arg 3)
Gerald
ChangeLog:
Properly cast parameters to fprintf(...,"%ld",...) to long.
Index: trace.c
===================================================================
RCS file: /home/wine/wine/server/trace.c,v
retrieving revision 1.179
diff -u -3 -p -r1.179 trace.c
--- trace.c 16 Sep 2003 01:07:21 -0000 1.179
+++ trace.c 21 Sep 2003 17:13:32 -0000
@@ -542,8 +542,8 @@ static void dump_get_thread_info_reply(
fprintf( stderr, " exit_code=%d,", req->exit_code );
fprintf( stderr, " priority=%d,", req->priority );
fprintf( stderr, " affinity=%d,", req->affinity );
- fprintf( stderr, " creation_time=%ld,", req->creation_time );
- fprintf( stderr, " exit_time=%ld", req->exit_time );
+ fprintf( stderr, " creation_time=%ld,", (long)req->creation_time );
+ fprintf( stderr, " exit_time=%ld", (long)req->exit_time );
}
static void dump_set_thread_info_request( const struct set_thread_info_request *req )
@@ -870,8 +870,8 @@ static void dump_truncate_file_request(
static void dump_set_file_time_request( const struct set_file_time_request *req )
{
fprintf( stderr, " handle=%p,", req->handle );
- fprintf( stderr, " access_time=%ld,", req->access_time );
- fprintf( stderr, " write_time=%ld", req->write_time );
+ fprintf( stderr, " access_time=%ld,", (long)req->access_time );
+ fprintf( stderr, " write_time=%ld", (long)req->write_time );
}
static void dump_flush_file_request( const struct flush_file_request *req )
@@ -893,9 +893,9 @@ static void dump_get_file_info_reply( co
{
fprintf( stderr, " type=%d,", req->type );
fprintf( stderr, " attr=%d,", req->attr );
- fprintf( stderr, " access_time=%ld,", req->access_time );
- fprintf( stderr, " write_time=%ld,", req->write_time );
- fprintf( stderr, " change_time=%ld,", req->change_time );
+ fprintf( stderr, " access_time=%ld,", (long)req->access_time );
+ fprintf( stderr, " write_time=%ld,", (long)req->write_time );
+ fprintf( stderr, " change_time=%ld,", (long)req->change_time );
fprintf( stderr, " size_high=%d,", req->size_high );
fprintf( stderr, " size_low=%d,", req->size_low );
fprintf( stderr, " alloc_high=%d,", req->alloc_high );
@@ -1507,7 +1507,7 @@ static void dump_create_key_request( con
fprintf( stderr, " parent=%p,", req->parent );
fprintf( stderr, " access=%08x,", req->access );
fprintf( stderr, " options=%08x,", req->options );
- fprintf( stderr, " modif=%ld,", req->modif );
+ fprintf( stderr, " modif=%ld,", (long)req->modif );
fprintf( stderr, " namelen=%d,", req->namelen );
fprintf( stderr, " name=" );
dump_varargs_unicode_str( min(cur_size,req->namelen) );
@@ -1555,7 +1555,7 @@ static void dump_enum_key_reply( const s
fprintf( stderr, " values=%d,", req->values );
fprintf( stderr, " max_value=%d,", req->max_value );
fprintf( stderr, " max_data=%d,", req->max_data );
- fprintf( stderr, " modif=%ld,", req->modif );
+ fprintf( stderr, " modif=%ld,", (long)req->modif );
fprintf( stderr, " total=%d,", req->total );
fprintf( stderr, " namelen=%d,", req->namelen );
fprintf( stderr, " name=" );
More information about the wine-patches
mailing list