ext2spice/ext2spice.c: %x => (intmax_t) %lx

Wrong type of arguments to formatting function

Looks like SPICE comment, change maintains hex without 0x prefix in portable way.

Copilot Autofix rejected: TxError("** %s (%p)\n", nsn, node);

CodeQL: https://github.com/dlmiles/magic/security/code-scanning/70
This commit is contained in:
Darryl L. Miles 2024-09-29 23:00:00 +01:00 committed by Tim Edwards
parent 0619cf4291
commit 4f5eb7da2d
1 changed files with 2 additions and 1 deletions

View File

@ -17,6 +17,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
#endif /* not lint */
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h> /* for atof() */
#include <string.h>
#include <ctype.h>
@ -3699,7 +3700,7 @@ nodeVisitDebug(node, res, cap)
hierName = (HierName *) node->efnode_name->efnn_hier;
nsn = nodeSpiceName(hierName, NULL);
TxError("** %s (%x)\n", nsn, node);
TxError("** %s (%lx)\n", nsn, (intmax_t) node);
printf("\t client.name=%s, client.m_w=%p\n",
((nodeClient *)node->efnode_client)->spiceNodeName,