intel/compiler: fix 64bit value prints on 32bit
authorGrazvydas Ignotas <notasas@gmail.com>
Sat, 3 Feb 2018 21:59:05 +0000 (23:59 +0200)
committerGrazvydas Ignotas <notasas@gmail.com>
Sat, 10 Feb 2018 15:59:02 +0000 (17:59 +0200)
Fix the following:
warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but
argument 3 has type ‘uint64_t {aka long long unsigned int}.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
src/intel/compiler/brw_disasm.c
src/intel/compiler/brw_nir_analyze_ubo_ranges.c

index 1a94ed39540b0539a8f6e25fa1c0603c342978a4..429ed78140440a8de4d0cbc77d35625f70f8a215 100644 (file)
@@ -1249,10 +1249,10 @@ imm(FILE *file, const struct gen_device_info *devinfo, enum brw_reg_type type,
 {
    switch (type) {
    case BRW_REGISTER_TYPE_UQ:
-      format(file, "0x%016lxUQ", brw_inst_imm_uq(devinfo, inst));
+      format(file, "0x%016"PRIx64"UQ", brw_inst_imm_uq(devinfo, inst));
       break;
    case BRW_REGISTER_TYPE_Q:
-      format(file, "%ldQ", brw_inst_imm_uq(devinfo, inst));
+      format(file, "%"PRId64"Q", brw_inst_imm_uq(devinfo, inst));
       break;
    case BRW_REGISTER_TYPE_UD:
       format(file, "0x%08xUD", brw_inst_imm_ud(devinfo, inst));
index 32fbf8fccd9f3bf4fbfac71a91967453f4c70069..d58fe3dd2e35b5424ff46b0aacfe9bf2102513a0 100644 (file)
@@ -158,7 +158,7 @@ print_ubo_entry(FILE *file,
    struct ubo_block_info *info = get_block_info(state, entry->range.block);
 
    fprintf(file,
-           "block %2d, start %2d, length %2d, bits = %zx, "
+           "block %2d, start %2d, length %2d, bits = %"PRIx64", "
            "benefit %2d, cost %2d, score = %2d\n",
            entry->range.block, entry->range.start, entry->range.length,
            info->offsets, entry->benefit, entry->range.length, score(entry));