public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Fix clang -Wcast-qual warning.
@ 2021-11-09  8:47 Martin Liška
  0 siblings, 0 replies; only message in thread
From: Martin Liška @ 2021-11-09  8:47 UTC (permalink / raw)
  To: gcc-patches

Pushed as obvious.

Martin

gcc/ChangeLog:

	* genconditions.c (write_one_condition): Add const qualifier
	to pointer casting.
---
  gcc/genconditions.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/genconditions.c b/gcc/genconditions.c
index a237df50127..b7f2a5afca5 100644
--- a/gcc/genconditions.c
+++ b/gcc/genconditions.c
@@ -123,7 +123,7 @@ extern rtx operands[];\n\
  static int
  write_one_condition (void **slot, void * ARG_UNUSED (dummy))
  {
-  const struct c_test *test = * (const struct c_test **) slot;
+  const struct c_test *test = *(const struct c_test *const *) slot;
    const char *p;
  
    rtx_reader_ptr->print_md_ptr_loc (test->expr);
-- 
2.33.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-11-09  8:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-09  8:47 [PATCH] Fix clang -Wcast-qual warning Martin Liška

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).