From: Douglas Bagnall Date: Thu, 28 Nov 2024 03:06:10 +0000 (+1300) Subject: librpc/wsp: use unsigned char for high byte comparison X-Git-Tag: tevent-0.17.0~566 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e64e533c77041444ee30586319ee1c5691320e5c;p=thirdparty%2Fsamba.git librpc/wsp: use unsigned char for high byte comparison ../../librpc/wsp/wsp_util.c:244:28: warning: result of comparison of constant 160 with expression of type 'char' is always false [-Wtautological-constant-out-of-range-compare] 244 | if (strlen(t) == 1 && *t == 0xa0) { Signed-off-by: Douglas Bagnall Reviewed-by: Volker Lendecke --- diff --git a/librpc/wsp/wsp_util.c b/librpc/wsp/wsp_util.c index d07338b1b5a..a072fbc4d26 100644 --- a/librpc/wsp/wsp_util.c +++ b/librpc/wsp/wsp_util.c @@ -241,7 +241,7 @@ static bool parse_properties_line(TALLOC_CTX *ctx, for (pos = 0; pos < talloc_array_length(csv_line); pos++) { t = strv_next(strv, t); /* the scraped property file can have a non ascii char */ - if (strlen(t) == 1 && *t == 0xa0) { + if (strlen(t) == 1 && *(unsigned char *)t == 0xa0) { csv_line[pos] = talloc_strdup(csv_line, ""); } else {