Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/tmux/dist Avoid comparing signed and unsigned v...



details:   https://anonhg.NetBSD.org/src/rev/ae37fff1286f
branches:  trunk
changeset: 376694:ae37fff1286f
user:      kre <kre%NetBSD.org@localhost>
date:      Thu Jun 29 01:30:31 2023 +0000

description:
Avoid comparing signed and unsigned values (using signed here seems
safer than the usual unsigned when this happens).   Might fix build.

diffstat:

 external/bsd/tmux/dist/cmd-display-menu.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r 5aa40974c645 -r ae37fff1286f external/bsd/tmux/dist/cmd-display-menu.c
--- a/external/bsd/tmux/dist/cmd-display-menu.c Wed Jun 28 22:47:39 2023 +0000
+++ b/external/bsd/tmux/dist/cmd-display-menu.c Thu Jun 29 01:30:31 2023 +0000
@@ -200,7 +200,7 @@ cmd_display_menu_get_position(struct cli
                } else
                        format_add(ft, "popup_mouse_centre_y", "%ld", n);
                n = (long)event->m.y + h;
-               if (n >= tty->sy)
+               if (n >= (long)tty->sy)
                        format_add(ft, "popup_mouse_top", "%u", tty->sy - 1);
                else
                        format_add(ft, "popup_mouse_top", "%ld", n);



Home | Main Index | Thread Index | Old Index