diff options
author | Ken Sharp <ken.sharp@artifex.com> | 2021-10-19 14:21:11 +0100 |
---|---|---|
committer | Ken Sharp <ken.sharp@artifex.com> | 2021-10-19 14:21:11 +0100 |
commit | 075580eb2356ade90d3474605185a38f76fd9dfb (patch) | |
tree | 6a069c20d0cd624d971890ad2d1ba64f6857981c /pdf/pdf_obj.c | |
parent | ffc7170eb48ff1519cedabcefaf41d50aec56b2e (diff) | |
download | ghostpdl-075580eb2356ade90d3474605185a38f76fd9dfb.tar.gz |
GhostPDF - fix some warnings on Windows
Robin spotted these, not sure why VS 2008 doesn't flag them but VS 2019
most certainly does.
Use the PRI64d macro in sscanf and snprintf to get the correct modifier
(either %lld or %I64d depending on whether this is Linux or Windows) for
64-bit numbers.
Diffstat (limited to 'pdf/pdf_obj.c')
-rw-r--r-- | pdf/pdf_obj.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pdf/pdf_obj.c b/pdf/pdf_obj.c index 931f2137a..aec1b35f5 100644 --- a/pdf/pdf_obj.c +++ b/pdf/pdf_obj.c @@ -540,7 +540,7 @@ static int pdfi_obj_int_str(pdf_context *ctx, pdf_obj *obj, byte **data, int *le buf = (char *)gs_alloc_bytes(ctx->memory, size, "pdfi_obj_int_str(data)"); if (buf == NULL) return_error(gs_error_VMerror); - snprintf(buf, size, "%ld", number->value.i); + snprintf(buf, size, "%"PRId64"", number->value.i); *data = (byte *)buf; *len = strlen(buf); return code; @@ -554,7 +554,7 @@ static int pdfi_obj_getrefstr(pdf_context *ctx, uint64_t object_num, uint32_t ge buf = (char *)gs_alloc_bytes(ctx->memory, size, "pdfi_obj_getrefstr(data)"); if (buf == NULL) return_error(gs_error_VMerror); - snprintf(buf, size, "%ld %d R", object_num, generation); + snprintf(buf, size, "%"PRId64" %d R", object_num, generation); *data = (byte *)buf; *len = strlen(buf); return 0; |