[hackers] [libgrapheme] Silence a few warnings and make it clear that speclen is at most 255 || Laslo Hunhold

From: <git_AT_suckless.org>
Date: Fri, 7 Jan 2022 18:35:17 +0100 (CET)

commit 7f5b55c8f25bf341296d95db83d1ad9f8c26a459
Author: Laslo Hunhold <dev_AT_frign.de>
AuthorDate: Fri Jan 7 18:34:26 2022 +0100
Commit: Laslo Hunhold <dev_AT_frign.de>
CommitDate: Fri Jan 7 18:34:26 2022 +0100

    Silence a few warnings and make it clear that speclen is at most 255
    
    This gives a clearer indication we are working with small enum-values
    rather than true offsets.
    
    Signed-off-by: Laslo Hunhold <dev_AT_frign.de>

diff --git a/gen/properties.c b/gen/properties.c
index 5825148..df30d7b 100644
--- a/gen/properties.c
+++ b/gen/properties.c
_AT_@ -25,7 +25,7 @@ struct property_spec {
 struct property_payload {
         struct properties *prop;
         const struct property_spec *spec;
- size_t speclen;
+ uint_least8_t speclen;
 };
 
 static const struct property_spec char_break_property[] = {
_AT_@ -113,7 +113,7 @@ break_property_callback(char *file, char **field, size_t nfields,
         /* prop always has the length 0x110000 */
         struct property_payload *p = (struct property_payload *)payload;
         struct range r;
- size_t i;
+ uint_least8_t i;
         uint_least32_t cp;
 
         (void)comment;
_AT_@ -161,7 +161,7 @@ struct compressed_properties {
         size_t datalen;
 };
 
-void
+static void
 compress_properties(const struct properties *prop,
                     struct compressed_properties *comp)
 {
Received on Fri Jan 07 2022 - 18:35:17 CET

This archive was generated by hypermail 2.3.0 : Fri Jan 07 2022 - 18:36:36 CET