Alexandre Julliard : winebuild: Fix a few printf format warnings by casting size_t.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Jun 14 06:51:24 CDT 2006


Module: wine
Branch: refs/heads/master
Commit: fb15dabdcddc18d17c2ae9c5c9241dd881dbd8c7
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=fb15dabdcddc18d17c2ae9c5c9241dd881dbd8c7

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue Jun 13 14:14:59 2006 +0200

winebuild: Fix a few printf format warnings by casting size_t.

---

 tools/winebuild/relay.c |    8 ++++----
 tools/winebuild/res32.c |    4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/tools/winebuild/relay.c b/tools/winebuild/relay.c
index fa7561d..50794ba 100644
--- a/tools/winebuild/relay.c
+++ b/tools/winebuild/relay.c
@@ -214,7 +214,7 @@ static void BuildCallFrom16Core( FILE *o
     if ( thunk )
     {
         /* Set up registers as expected and call thunk */
-        fprintf( outfile, "\tleal %d(%%edx), %%ebx\n", sizeof(STACK16FRAME)-22 );
+        fprintf( outfile, "\tleal %d(%%edx), %%ebx\n", (int)sizeof(STACK16FRAME)-22 );
         fprintf( outfile, "\tleal -4(%%esp), %%ebp\n" );
 
         fprintf( outfile, "\tcall *%d(%%edx)\n", STACK16OFFSET(entry_point) );
@@ -248,7 +248,7 @@ static void BuildCallFrom16Core( FILE *o
     /* Build register CONTEXT */
     if ( reg_func )
     {
-        fprintf( outfile, "\tsubl $%d, %%esp\n", sizeof(CONTEXT86) );
+        fprintf( outfile, "\tsubl $%d, %%esp\n", (int)sizeof(CONTEXT86) );
 
         fprintf( outfile, "\tmovl %%ecx, %d(%%esp)\n", CONTEXTOFFSET(EFlags) );
 
@@ -301,7 +301,7 @@ #endif
     }
 
     /* Call relay routine (which will call the API entry point) */
-    fprintf( outfile, "\tleal %d(%%edx), %%eax\n", sizeof(STACK16FRAME) );
+    fprintf( outfile, "\tleal %d(%%edx), %%eax\n", (int)sizeof(STACK16FRAME) );
     fprintf( outfile, "\tpushl %%eax\n" );
     fprintf( outfile, "\tpushl %d(%%edx)\n", STACK16OFFSET(entry_point) );
     fprintf( outfile, "\tcall *%d(%%edx)\n", STACK16OFFSET(relay) );
@@ -309,7 +309,7 @@ #endif
     if ( reg_func )
     {
         fprintf( outfile, "\tleal -%d(%%ebp), %%ebx\n",
-                 sizeof(CONTEXT) + STACK32OFFSET(ebp) );
+                 (int)sizeof(CONTEXT) + STACK32OFFSET(ebp) );
 
         /* Switch stack back */
         fprintf( outfile, "\t.byte 0x64\n\tmovw (%d), %%ss\n", STACKOFFSET+2 );
diff --git a/tools/winebuild/res32.c b/tools/winebuild/res32.c
index ef98195..c283498 100644
--- a/tools/winebuild/res32.c
+++ b/tools/winebuild/res32.c
@@ -428,8 +428,8 @@ void output_resources( FILE *outfile, DL
             output_res_dir( outfile, 0, name->nb_languages );
             for (k = 0, res = name->res; k < name->nb_languages; k++, res++)
             {
-                fprintf( outfile, "\t.long 0x%08x,0x%08x\n", res->lang,
-                         data_offset + (res - spec->resources) * sizeof(IMAGE_RESOURCE_DATA_ENTRY) );
+                unsigned int entry_offset = (res - spec->resources) * sizeof(IMAGE_RESOURCE_DATA_ENTRY);
+                fprintf( outfile, "\t.long 0x%08x,0x%08x\n", res->lang, data_offset + entry_offset );
             }
         }
     }




More information about the wine-cvs mailing list