Skip to contentSkip to conversation

x86/vdso: avoid warning when building vdso2c on 32-bit host

PATCH In review Jan Beulich 2 participants 2 messages Mar 10, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/vdso: avoid warning when building vdso2c on 32-bit host

size_t arguments can't compatibly be passed for l-modifier format specifiers. Use z instead.

Fixes 8382c668ce4f ("x86/vdso: Add support for exception fixup in vDSO functions")
arch/x86/entry/vdso/vdso2c.h +1 -1
@@ -35,7 +35,7 @@ static void BITSFUNC(extract)(const unsi
 	if (offset + len > data_len)
 		fail("section to extract overruns input data");
 
-	fprintf(outfile, "static const unsigned char %s[%lu] = {", name, len);
+	fprintf(outfile, "static const unsigned char %s[%zu] = {", name, len);
 	BITSFUNC(copy)(outfile, data + offset, len);
 	fprintf(outfile, "\n};\n\n");
 }
maintainer
#1 lore raw
Quoted 9 lines · Jan Beulich

size_t arguments can't compatibly be passed for l-modifier format specifiers. Use z instead.

Fixes 8382c668ce4f ("x86/vdso: Add support for exception fixup in vDSO functions")

arch/x86/entry/vdso/vdso2c.h static void BITSFUNC(extract)(const unsi · line 40

Quoted 7 lines
arch/x86/entry/vdso/vdso2c.h +1 -1
@@ -35,7 +35,7 @@ static void BITSFUNC(extract)(const unsi
 	if (offset + len > data_len)
 		fail("section to extract overruns input data");
 
-	fprintf(outfile, "static const unsigned char %s[%lu] = {", name, len);
+	fprintf(outfile, "static const unsigned char %s[%zu] = {", name, len);
 	BITSFUNC(copy)(outfile, data + offset, len);
 	fprintf(outfile, "\n};\n\n");

Already fixed:

https://git.kernel.org/tip/70c9d959226b7c5c48c119e2c1cfc1424f87b023

Thx.

Signature · 4 lines
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette