From: guenther Date: Fri, 16 Aug 2024 23:09:25 +0000 (+0000) Subject: Cast to unsigned char after or'ing in the meta bit, so the compiler X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=3ed9484fbb6d44d0b47eea97c098467542b1d6ec;p=openbsd Cast to unsigned char after or'ing in the meta bit, so the compiler doesn't complain when it's implicitly converted to plain char in an assignment, and to make sure it's not negative when used as an array index. ok miod@ --- diff --git a/gnu/usr.bin/texinfo/info/infomap.h b/gnu/usr.bin/texinfo/info/infomap.h index e3aa3e7130a..0938c14a4ce 100644 --- a/gnu/usr.bin/texinfo/info/infomap.h +++ b/gnu/usr.bin/texinfo/info/infomap.h @@ -1,5 +1,5 @@ /* infomap.h -- description of a keymap in Info and related functions. - $Id: infomap.h,v 1.1.1.4 2006/07/17 16:03:43 espie Exp $ + $Id: infomap.h,v 1.2 2024/08/16 23:09:25 guenther Exp $ Copyright (C) 1993, 2001, 2004 Free Software Foundation, Inc. @@ -40,7 +40,7 @@ #define Meta_p(c) (((c) > meta_character_threshold)) #define Control_p(c) ((c) < control_character_threshold) -#define Meta(c) ((c) | (meta_character_bit)) +#define Meta(c) ((unsigned char)((c) | (meta_character_bit))) #define UnMeta(c) ((c) & (~meta_character_bit)) #define Control(c) ((toupper (c)) & (~control_character_bit)) #define UnControl(c) (tolower ((c) | control_character_bit))