From: Bruno Haible Date: Sun, 6 Sep 2020 20:18:28 +0000 (+0200) Subject: Fix "warning: cast from 'const void *' to 'struct compiled_kwset *' drops const quali... X-Git-Tag: v0.21.1~53 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb3944c16c158c476187ce1bcc809fb7db735e28;p=thirdparty%2Fgettext.git Fix "warning: cast from 'const void *' to 'struct compiled_kwset *' drops const qualifier". * gettext-tools/libgrep/m-fgrep.c (Fexecute): Add 'const'. --- diff --git a/gettext-tools/libgrep/m-fgrep.c b/gettext-tools/libgrep/m-fgrep.c index 68b1f1763..f14f37058 100644 --- a/gettext-tools/libgrep/m-fgrep.c +++ b/gettext-tools/libgrep/m-fgrep.c @@ -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;