Mercurial > hg > dmlib
comparison tools/fanalyze.c @ 2389:647671a9a0b8
More printf() format specifier size_t -related fixes.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 09 Jan 2020 20:14:58 +0200 |
parents | 36edd316184a |
children | 679732e4cfed |
comparison
equal
deleted
inserted
replaced
2388:2dbbc1c91231 | 2389:647671a9a0b8 |
---|---|
716 } | 716 } |
717 } | 717 } |
718 | 718 |
719 if (match) | 719 if (match) |
720 { | 720 { |
721 dmPrint(0, "%08x : ", offs); | 721 dmPrint(0, "%08" DM_PRIx_SIZE_T " : ", offs); |
722 dmPrintGrepValueList(node, TRUE, file, offs); | 722 dmPrintGrepValueList(node, TRUE, file, offs); |
723 } | 723 } |
724 } | 724 } |
725 } | 725 } |
726 } | 726 } |
793 else | 793 else |
794 if (setMode == FA_ANALYZE) | 794 if (setMode == FA_ANALYZE) |
795 { | 795 { |
796 // Allocate comparision buffer | 796 // Allocate comparision buffer |
797 // XXX: integer overflow? | 797 // XXX: integer overflow? |
798 dmPrint(2, "Allocating %d element (%d bytes) comparision buffer.\n", | 798 dmPrint(2, "Allocating %" DM_PRIu_SIZE_T " element (%" DM_PRIu_SIZE_T |
799 " bytes) comparision buffer.\n", | |
799 compBufSize, compBufSize * sizeof(DMCompElem)); | 800 compBufSize, compBufSize * sizeof(DMCompElem)); |
800 | 801 |
801 if ((compBuf = dmCalloc(compBufSize, sizeof(DMCompElem))) == NULL) | 802 if ((compBuf = dmCalloc(compBufSize, sizeof(DMCompElem))) == NULL) |
802 { | 803 { |
803 dmErrorMsg("Out of memory. Could not allocate comparision buffer!\n"); | 804 dmErrorMsg("Out of memory. Could not allocate comparision buffer!\n"); |