]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fix clang -Wcast-qual warning.
authorMartin Liska <mliska@suse.cz>
Tue, 9 Nov 2021 08:46:09 +0000 (09:46 +0100)
committerMartin Liska <mliska@suse.cz>
Tue, 9 Nov 2021 08:46:09 +0000 (09:46 +0100)
gcc/ChangeLog:

* genconditions.c (write_one_condition): Add const qualifier
to pointer casting.

gcc/genconditions.c

index a237df501272158eba9274d23514fd5b08ad2763..b7f2a5afca52f2ebedd82364bfb8b30da087b96b 100644 (file)
@@ -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);