@d0k3 can you tell me what I'm doing wrong?
I get this error
not sure why it's doing that, I'm pretty sure I'm not giving the %s anything but what it should have...
EDIT: welp I'm dumb, fixed it
Code:
//create label files
printf("\n");
for (u32 idx_m = 0; menu[idx_m].name != NULL; idx_m++) {
for (u32 idx_s = 0; idx_s < menu[idx_m].n_entries; idx_s++) {
for (u32 a = 0; a < 2; a++) {
printf( "convert -background transparent -font %s -pointsize %i ", entry_font, entry_font_size );
printf( "-fill %s -stroke %s -strokewidth %s -kerning %s \"label:%s\" $BUILD/label%04i_%i.png\n",
(a == 1) ? entry_active_color : entry_inactive_color,
(a == 1) ? entry_active_color_stroke : entry_inactive_color_stroke,
menu_font_strokewidth, menu_font_kerning,
menu[idx_m].entries[idx_s].name, (idx_m * 100) + idx_s, a);
}
if (menu[idx_m].entries[idx_s].desc != NULL) {
printf( "convert -background transparent -font %s -pointsize %i ", desc_font, desc_font_size );
printf( "-fill %s -stroke '%s' -strokewidth '%s' kerning '%s' -size %ix%i -gravity %s \"caption:%s\" $BUILD/desc%04i.png\n",
desc_color, desc_color_stroke, desc_font_strokewidth, desc_font_kerning,
desc_dim_x, desc_dim_y, desc_gravity,
menu[idx_m].entries[idx_s].desc, (idx_m * 100) + idx_s);
}
}
for (u32 a = 0; a < 2; a++) {
printf( "convert -background transparent -font %s -pointsize %i ", menu_font, menu_font_size );
printf( "-fill %s -stroke %s -strokewidth %s -kerning %s \"label:%s\" $BUILD/mlabel%02i_%i.png\n",
(a == 1) ? menu_active_color : menu_inactive_color,
(a == 1) ? menu_active_color_stroke : menu_inactive_color_stroke,
menu_font_strokewidth, menu_font_kerning,
menu[idx_m].name, idx_m, a);
}
}
I get this error
Code:
gcc -I. -O3 -Wall -pedantic -std=c11 -funroll-loops -ffast-math -fsched-spec-load -fomit-frame-pointer -c -o main.o main.c
In file included from main.c:2:0:
d9menu.h:177:18: warning: ISO C forbids empty initializer braces [-Wpedantic]
NULL, 0, {}, // empty menu to signal end
^
main.c: In function ‘main’:
main.c:68:21: warning: format ‘%s’ expects argument of type ‘char *’, but argument 4 has type ‘int’ [-Wformat=]
menu[idx_m].entries[idx_s].name, (idx_m * 100) + idx_s, a);
^
main.c:68:21: warning: format ‘%s’ expects argument of type ‘char *’, but argument 5 has type ‘int’ [-Wformat=]
main.c:75:21: warning: format ‘%s’ expects argument of type ‘char *’, but argument 4 has type ‘int’ [-Wformat=]
menu[idx_m].entries[idx_s].desc, (idx_m * 100) + idx_s);
^
main.c:75:21: warning: format ‘%s’ expects argument of type ‘char *’, but argument 5 has type ‘int’ [-Wformat=]
main.c:75:21: warning: format ‘%s’ expects argument of type ‘char *’, but argument 6 has type ‘int’ [-Wformat=]
main.c:75:21: warning: format ‘%s’ expects argument of type ‘char *’, but argument 7 has type ‘int’ [-Wformat=]
main.c:75:21: warning: format ‘%i’ expects argument of type ‘int’, but argument 8 has type ‘char *’ [-Wformat=]
main.c:75:21: warning: too many arguments for format [-Wformat-extra-args]
main.c:85:17: warning: format ‘%s’ expects argument of type ‘char *’, but argument 4 has type ‘int’ [-Wformat=]
menu[idx_m].name, idx_m, a);
^
main.c:85:17: warning: format ‘%s’ expects argument of type ‘char *’, but argument 5 has type ‘int’ [-Wformat=]
not sure why it's doing that, I'm pretty sure I'm not giving the %s anything but what it should have...
EDIT: welp I'm dumb, fixed it
Last edited by dark_samus3,