The %x and %o specifers require unsigned arguments. Signed-off-by: Ben Boeckel <maths...@gmail.com> --- cmd-capture-pane.c | 2 +- input-keys.c | 6 +++--- key-string.c | 2 +- layout.c | 2 +- tty-keys.c | 8 ++++---- 5 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/cmd-capture-pane.c b/cmd-capture-pane.c index ce60b4c..68fef98 100644 --- a/cmd-capture-pane.c +++ b/cmd-capture-pane.c @@ -74,7 +74,7 @@ cmd_capture_pane_pending(struct args *args, struct window_pane *wp, tmp[0] = line[i]; tmp[1] = '\0'; } else - xsnprintf(tmp, sizeof tmp, "\\%03o", line[i]); + xsnprintf(tmp, sizeof tmp, "\\%03o", (unsigned char)line[i]); buf = cmd_capture_pane_append(buf, len, tmp, strlen(tmp)); } diff --git a/input-keys.c b/input-keys.c index 762e86b..969ec08 100644 --- a/input-keys.c +++ b/input-keys.c @@ -142,7 +142,7 @@ input_key(struct window_pane *wp, int key) char *out; u_char ch; - log_debug("writing key 0x%x", key); + log_debug("writing key 0x%x", (unsigned)key); /* * If this is a normal 7-bit key, just send it, with a leading escape @@ -185,11 +185,11 @@ input_key(struct window_pane *wp, int key) break; } if (i == nitems(input_keys)) { - log_debug("key 0x%x missing", key); + log_debug("key 0x%x missing", (unsigned)key); return; } dlen = strlen(ike->data); - log_debug("found key 0x%x: \"%s\"", key, ike->data); + log_debug("found key 0x%x: \"%s\"", (unsigned)key, ike->data); /* Prefix a \033 for escape. */ if (key & KEYC_ESCAPE) diff --git a/key-string.c b/key-string.c index db96827..ab9f2f9 100644 --- a/key-string.c +++ b/key-string.c @@ -236,7 +236,7 @@ key_string_lookup_key(int key) tmp[0] = key; tmp[1] = '\0'; } else if (key >= 128) - xsnprintf(tmp, sizeof tmp, "\\%o", key); + xsnprintf(tmp, sizeof tmp, "\\%o", (unsigned)key); strlcat(out, tmp, sizeof out); return (out); diff --git a/layout.c b/layout.c index b91b86c..9ba8fca 100644 --- a/layout.c +++ b/layout.c @@ -86,7 +86,7 @@ layout_print_cell(struct layout_cell *lc, const char *hdr, u_int n) struct layout_cell *lcchild; log_debug( - "%s:%*s%p type %u [parent %p] wp=%p [%u,%u %ux%u]", hdr, n, " ", lc, + "%s:%*s%p type %u [parent %p] wp=%p [%u,%u %ux%u]", hdr, (int)n, " ", lc, lc->type, lc->parent, lc->wp, lc->xoff, lc->yoff, lc->sx, lc->sy); switch (lc->type) { case LAYOUT_LEFTRIGHT: diff --git a/tty-keys.c b/tty-keys.c index a987c44..42db792 100644 --- a/tty-keys.c +++ b/tty-keys.c @@ -326,10 +326,10 @@ tty_keys_add(struct tty *tty, const char *s, int key) keystr = key_string_lookup_key(key); if ((tk = tty_keys_find(tty, s, strlen(s), &size)) == NULL) { - log_debug("new key %s: 0x%x (%s)", s, key, keystr); + log_debug("new key %s: 0x%x (%s)", s, (unsigned)key, keystr); tty_keys_add1(&tty->key_tree, s, key); } else { - log_debug("replacing key %s: 0x%x (%s)", s, key, keystr); + log_debug("replacing key %s: 0x%x (%s)", s, (unsigned)key, keystr); tk->key = key; } } @@ -589,7 +589,7 @@ partial_key: return (0); complete_key: - log_debug("complete key %.*s %#x", (int) size, buf, key); + log_debug("complete key %.*s %#x", (int) size, buf, (unsigned)key); /* Remove data from buffer. */ evbuffer_drain(tty->event->input, size); @@ -615,7 +615,7 @@ complete_key: return (1); discard_key: - log_debug("discard key %.*s %#x", (int) size, buf, key); + log_debug("discard key %.*s %#x", (int) size, buf, (unsigned)key); /* Remove data from buffer. */ evbuffer_drain(tty->event->input, size); -- 2.3.0 ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk _______________________________________________ tmux-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users