From 8a61129e5b9479a66c09f1adc64f3cb4f5cd781b Mon Sep 17 00:00:00 2001 From: Debian Python Team Date: Thu, 24 Mar 2022 19:39:34 +0000 Subject: [PATCH] revlog_unsigned_char_fix # HG changeset patch # User Julien Cristau # Date 1647277023 -3600 # Mon Mar 14 17:57:03 2022 +0100 # Branch stable # Node ID 9ce563fb2989eda394330d3a9d37a8a75995a304 # Parent 59be65b7cdfded782e992c9d2e5557a7e78be878 revlog: fix wrong type of rank_unknown variable We treat "rank" as an int everywhere, but declare rank_unknown as a char. On architectures where char is signed, that works out ok, but when char is unsigned, rank_unknown is 255 instead of -1. Differential Revision: https://phab.mercurial-scm.org/D12374 Gbp-Pq: Name revlog_unsigned_char_fix.patch --- mercurial/cext/revlog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mercurial/cext/revlog.c b/mercurial/cext/revlog.c index 44ca4e5..0996160 100644 --- a/mercurial/cext/revlog.c +++ b/mercurial/cext/revlog.c @@ -179,7 +179,7 @@ static const long entry_cl2_offset_rank = 69; /* next free offset: 73 */ static const char comp_mode_inline = 2; -static const char rank_unknown = -1; +static const int rank_unknown = -1; static void raise_revlog_error(void) { -- 2.30.2