[PATCH v1 1/2] eppic: Fix incompatible pointer type warnings

Petr Tesarik petr at tesarici.cz
Sat Apr 15 09:02:12 PDT 2023


From: Petr Tesarik <ptesarik at suse.com>

On Linux, eppic defines ull (a bit confusingly) as uint64_t. This
is an unsigned long on 64-bit platforms with both GCC and LLVM, and
the compiler complains about passing a pointer to an unsigned long
where a pointer to an unsigned long long is expected.

It is not a real bug, because both types are identical on 64-bit
platforms, and on 32-bit platforms, uint64_t denotes an unsigned
long long, but the warning is annoying.

Signed-off-by: Petr Tesarik <petr at tesarici.cz>
---
 extension_eppic.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/extension_eppic.c b/extension_eppic.c
index 45bc032..8aa9ed2 100644
--- a/extension_eppic.c
+++ b/extension_eppic.c
@@ -122,7 +122,7 @@ drilldown(ull offset, type_t *t)
 {
 	int type_flag, len = 0, t_len = 0, nidx = 0;
 	int fctflg = 0, ref = 0, *idxlst = 0;
-	ull die_off = offset, t_die_off;
+	unsigned long long die_off = offset, t_die_off;
 	char *tstr = NULL, *tstr_dup = NULL;
 
 	while (GET_DIE_ATTR_TYPE(die_off, &type_flag, &t_die_off)) {
@@ -221,7 +221,7 @@ apimember(char *mname, ull idx, type_t *tm, member_t *m, ull *last_index)
 	int index, nfields = -1, size;
 	int nbits = 0, fbits = 0;
 	long offset;
-	ull m_die, die_off = idx;
+	unsigned long long m_die, die_off = idx;
 	char *name = NULL;
 
 	nfields = GET_DIE_NFIELDS_ALL(die_off);
-- 
2.40.0




More information about the kexec mailing list