From bb3944c16c158c476187ce1bcc809fb7db735e28 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 6 Sep 2020 22:18:28 +0200 Subject: [PATCH] Fix "warning: cast from 'const void *' to 'struct compiled_kwset *' drops const qualifier". * gettext-tools/libgrep/m-fgrep.c (Fexecute): Add 'const'. --- gettext-tools/libgrep/m-fgrep.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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; -- 2.47.2