diff --git a/src/lib/blit.c b/src/lib/blit.c index d0f98e478..d57f6b579 100644 --- a/src/lib/blit.c +++ b/src/lib/blit.c @@ -844,7 +844,7 @@ int ncblit_bgrx(const void* data, int linesize, const struct ncvisual_options* v int ncblit_rgba(const void* data, int linesize, const struct ncvisual_options* vopts){ if(vopts->flags > NCVISUAL_OPTION_BLEND){ - fprintf(stderr, "Warning: unknown ncvisual options %016lx\n", vopts->flags); + fprintf(stderr, "Warning: unknown ncvisual options %016jx\n", (uintmax_t)vopts->flags); } if(linesize <= 0 || (size_t)linesize < vopts->lenx * sizeof(uint32_t)){ return -1; diff --git a/src/lib/fd.c b/src/lib/fd.c index 9fd92598f..a728acd68 100644 --- a/src/lib/fd.c +++ b/src/lib/fd.c @@ -101,7 +101,7 @@ ncfdplane_create_internal(ncplane* n, const ncfdplane_options* opts, int fd, ncfdplane_callback cbfxn, ncfdplane_done_cb donecbfxn, bool thread){ if(opts->flags > 0){ - logwarn(ncplane_notcurses(n), "Provided unsupported flags %016lx\n", opts->flags); + logwarn(ncplane_notcurses(n), "Provided unsupported flags %016jx\n", (uintmax_t)opts->flags); } ncfdplane* ret = malloc(sizeof(*ret)); if(ret == NULL){ @@ -302,7 +302,7 @@ ncsubproc* ncsubproc_createv(ncplane* n, const ncsubproc_options* opts, return NULL; } if(opts->flags > 0){ - logwarn(ncplane_notcurses(n), "Provided unsupported flags %016lx\n", opts->flags); + logwarn(ncplane_notcurses(n), "Provided unsupported flags %016jx\n", (uintmax_t)opts->flags); } int fd = -1; ncsubproc* ret = malloc(sizeof(*ret)); @@ -337,7 +337,7 @@ ncsubproc* ncsubproc_createvp(ncplane* n, const ncsubproc_options* opts, return NULL; } if(opts->flags > 0){ - logwarn(ncplane_notcurses(n), "Provided unsupported flags %016lx\n", opts->flags); + logwarn(ncplane_notcurses(n), "Provided unsupported flags %016jx\n", (uintmax_t)opts->flags); } int fd = -1; ncsubproc* ret = malloc(sizeof(*ret)); @@ -372,7 +372,7 @@ ncsubproc* ncsubproc_createvpe(ncplane* n, const ncsubproc_options* opts, return NULL; } if(opts->flags > 0){ - logwarn(ncplane_notcurses(n), "Provided unsupported flags %016lx\n", opts->flags); + logwarn(ncplane_notcurses(n), "Provided unsupported flags %016jx\n", (uintmax_t)opts->flags); } int fd = -1; ncsubproc* ret = malloc(sizeof(*ret)); diff --git a/src/lib/linux.c b/src/lib/linux.c index 0b00b8cfc..89eb167cb 100644 --- a/src/lib/linux.c +++ b/src/lib/linux.c @@ -458,11 +458,11 @@ program_block_drawing_chars(const notcurses* nc, struct consolefontdesc* cfd, } } if(candidate == 0){ - logwarn(nc, "Ran out of replaceable glyphs for U+%04x\n", shimmers[s].w); + logwarn(nc, "Ran out of replaceable glyphs for U+%04lx\n", (long)shimmers[s].w); return -1; } if(shimmers[s].glyphfxn(cfd, candidate)){ - logwarn(nc, "Error replacing glyph for U+%04x at %u\n", shimmers[s].w, candidate); + logwarn(nc, "Error replacing glyph for U+%04lx at %u\n", (long)shimmers[s].w, candidate); return -1; } if(add_to_map(nc, map, shimmers[s].w, candidate)){ diff --git a/src/lib/menu.c b/src/lib/menu.c index 1cf3d9b31..6d25e2cd3 100644 --- a/src/lib/menu.c +++ b/src/lib/menu.c @@ -306,7 +306,7 @@ ncmenu* ncmenu_create(ncplane* n, const ncmenu_options* opts){ return NULL; } if(opts->flags > NCMENU_OPTION_HIDING){ - logwarn(ncplane_notcurses(n), "Provided unsupported flags %016lx\n", opts->flags); + logwarn(ncplane_notcurses(n), "Provided unsupported flags %016jx\n", (uintmax_t)opts->flags); } int totalheight = 1; int totalwidth = 2; // start with two-character margin on the left diff --git a/src/lib/notcurses.c b/src/lib/notcurses.c index 05f2b971d..1487f6e3a 100644 --- a/src/lib/notcurses.c +++ b/src/lib/notcurses.c @@ -337,7 +337,7 @@ make_ncpile(notcurses* nc, ncplane* n){ ncplane* ncplane_new_internal(notcurses* nc, ncplane* n, const ncplane_options* nopts){ if(nopts->flags > NCPLANE_OPTION_HORALIGNED){ - logwarn(nc, "Provided unsupported flags %016lx\n", nopts->flags); + logwarn(nc, "Provided unsupported flags %016jx\n", (uintmax_t)nopts->flags); } if(nopts->rows <= 0 || nopts->cols <= 0){ logerror(nc, "Won't create denormalized plane (r=%d, c=%d)\n", @@ -985,7 +985,7 @@ notcurses* notcurses_init(const notcurses_options* opts, FILE* outfp){ return NULL; } if(opts->flags >= (NCOPTION_NO_FONT_CHANGES << 1u)){ - fprintf(stderr, "Warning: unknown Notcurses options %016lx\n", opts->flags); + fprintf(stderr, "Warning: unknown Notcurses options %016jx\n", (uintmax_t)opts->flags); } notcurses* ret = malloc(sizeof(*ret)); if(ret == NULL){ diff --git a/src/lib/plot.h b/src/lib/plot.h index 729d9206f..9523695b2 100644 --- a/src/lib/plot.h +++ b/src/lib/plot.h @@ -21,7 +21,7 @@ class ncppplot { opts = &zeroed; } if(opts->flags > NCPLOT_OPTION_DETECTMAXONLY){ - logwarn(ncplane_notcurses(n), "Provided unsupported flags %016lx\n", opts->flags); + logwarn(ncplane_notcurses(n), "Provided unsupported flags %016jx\n", (uintmax_t)opts->flags); } //struct notcurses* nc = n->nc; // if miny == maxy (enabling domain detection), they both must be equal to 0 diff --git a/src/lib/reader.c b/src/lib/reader.c index 836857854..a2c61bb7e 100644 --- a/src/lib/reader.c +++ b/src/lib/reader.c @@ -6,7 +6,7 @@ ncreader* ncreader_create(ncplane* n, const ncreader_options* opts){ opts = &zeroed; } if(opts->flags > NCREADER_OPTION_CURSOR){ - logwarn(ncplane_notcurses(n), "Provided unsupported flags %016lx\n", opts->flags); + logwarn(ncplane_notcurses(n), "Provided unsupported flags %016jx\n", (uintmax_t)opts->flags); } ncreader* nr = malloc(sizeof(*nr)); if(nr == NULL){ diff --git a/src/lib/reel.c b/src/lib/reel.c index d3003b67e..7f2b18b0c 100644 --- a/src/lib/reel.c +++ b/src/lib/reel.c @@ -718,7 +718,7 @@ validate_ncreel_opts(ncplane* n, const ncreel_options* ropts){ return false; } if(ropts->flags > NCREEL_OPTION_CIRCULAR){ - logwarn(ncplane_notcurses(n), "Provided unsupported flags %016lx\n", ropts->flags); + logwarn(ncplane_notcurses(n), "Provided unsupported flags %016jx\n", (uintmax_t)ropts->flags); } if(ropts->flags & NCREEL_OPTION_CIRCULAR){ if(!(ropts->flags & NCREEL_OPTION_INFINITESCROLL)){ diff --git a/src/lib/selector.c b/src/lib/selector.c index fda7c3591..9a2c98857 100644 --- a/src/lib/selector.c +++ b/src/lib/selector.c @@ -833,7 +833,7 @@ ncmultiselector* ncmultiselector_create(ncplane* n, const ncmultiselector_option opts = &zeroed; } if(opts->flags > 0){ - logwarn(ncplane_notcurses(n), "Provided unsupported flags %016lx\n", opts->flags); + logwarn(ncplane_notcurses(n), "Provided unsupported flags %016jx\n", (uintmax_t)opts->flags); } unsigned itemcount = 0; if(opts->items){ diff --git a/src/lib/visual.cpp b/src/lib/visual.cpp index edd35fe2e..02cfd5e94 100644 --- a/src/lib/visual.cpp +++ b/src/lib/visual.cpp @@ -364,7 +364,7 @@ auto ncvisual_from_bgra(const void* bgra, int rows, int rowstride, auto ncvisual_render(notcurses* nc, ncvisual* ncv, const struct ncvisual_options* vopts) -> ncplane* { if(vopts && vopts->flags > NCVISUAL_OPTION_BLEND){ - fprintf(stderr, "Warning: unknown ncvisual options %016lx\n", vopts->flags); + fprintf(stderr, "Warning: unknown ncvisual options %016jx\n", (uintmax_t)vopts->flags); } int lenx = vopts ? vopts->lenx : 0; int leny = vopts ? vopts->leny : 0; diff --git a/src/poc/wcwidth.c b/src/poc/wcwidth.c index df4bbcbcc..b2de96378 100644 --- a/src/poc/wcwidth.c +++ b/src/poc/wcwidth.c @@ -21,7 +21,7 @@ int main(int argc, char **argv){ return EXIT_FAILURE; } int width = wcwidth(w); - printf("w(0x%05x): %d %lc\n", w, width, w); + printf("w(0x%05lx): %d %lc\n", (long)w, width, w); arg += conv; } }