Fix warnings.
authorDavid Given <dg@cowlark.com>
Mon, 12 Dec 2016 22:42:10 +0000 (23:42 +0100)
committerDavid Given <dg@cowlark.com>
Mon, 12 Dec 2016 22:42:10 +0000 (23:42 +0100)
mach/proto/mcg/data.c

index 13352ed..a237d5a 100644 (file)
@@ -61,7 +61,7 @@ void data_int(arith data, size_t size, bool is_ro)
 {
        emit_header(is_ro ? SECTION_ROM : SECTION_DATA);
     assert((size == 1) || (size == 2) || (size == 4) || (size == 8));
-    fprintf(outputfile, "\t.data%d ", size);
+    fprintf(outputfile, "\t.data%zd ", size);
     writehex(data, size);
     fprintf(outputfile, "\n");
 }
@@ -75,11 +75,11 @@ void data_float(const char* data, size_t size, bool is_ro)
        emit_header(is_ro ? SECTION_ROM : SECTION_DATA);
     assert((size == 4) || (size == 8));
 
-    i = float_cst(data, size, (char*) buffer);
+    i = float_cst((char*) data, size, (char*) buffer);
     if ((i != 0) && (i != 2)) /* 2 == overflow */
         fatal("cannot parse floating point constant %s sz %d", data, size);
 
-    fprintf(outputfile, "\t!float %s sz %d\n", data, size);
+    fprintf(outputfile, "\t!float %s sz %zd\n", data, size);
     fprintf(outputfile, "\t.data1 ");
     writehex(buffer[0], 1);
     for (i=1; i<size; i++)
@@ -144,7 +144,7 @@ void data_block(const uint8_t* data, size_t size, bool is_ro)
 void data_offset(const char* label, arith offset, bool is_ro)
 {
        emit_header(is_ro ? SECTION_ROM : SECTION_DATA);
-    fprintf(outputfile, "\t.data%d %s+%lld\n",
+    fprintf(outputfile, "\t.data%d %s+%ld\n",
         EM_pointersize, platform_label(label), offset);
 }
 
@@ -154,7 +154,7 @@ void data_bss(arith size, int init)
         fatal("non-zero-initialised bss not supported");
 
     emit_header(SECTION_BSS);
-    fprintf(outputfile, "\t.space %lld\n", size);
+    fprintf(outputfile, "\t.space %ld\n", size);
 }
 
 /* vim: set sw=4 ts=4 expandtab : */