]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Fix "warning: cast from 'const void *' to 'struct compiled_kwset *' drops const quali...
authorBruno Haible <bruno@clisp.org>
Sun, 6 Sep 2020 20:18:28 +0000 (22:18 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 9 Oct 2022 07:30:42 +0000 (09:30 +0200)
* gettext-tools/libgrep/m-fgrep.c (Fexecute): Add 'const'.

gettext-tools/libgrep/m-fgrep.c

index 68b1f17634eeb8fc034e1525259f5a7b763987b6..f14f37058aa6d68c6ce2fe431773727f0b8b72a6 100644 (file)
@@ -1,5 +1,5 @@
 /* Pattern Matcher for Fixed String search.
-   Copyright (C) 1992, 1998, 2000, 2005-2006, 2010, 2013 Free Software
+   Copyright (C) 1992, 1998, 2000, 2005-2006, 2010, 2013, 2020 Free Software
    Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
@@ -156,7 +156,8 @@ static size_t
 Fexecute (const void *compiled_pattern, const char *buf, size_t buf_size,
           size_t *match_size, bool exact)
 {
-  struct compiled_kwset *ckwset = (struct compiled_kwset *) compiled_pattern;
+  const struct compiled_kwset *ckwset =
+    (const struct compiled_kwset *) compiled_pattern;
   char eol = ckwset->eolbyte;
   register const char *buflim = buf + buf_size;
   register const char *beg;