diff mbox

[libibery] Fix bootstrap

Message ID 024459fb-b511-ec03-7b02-365804fab108@acm.org
State New
Headers show

Commit Message

Nathan Sidwell May 25, 2017, 12:56 a.m. UTC
On 05/24/2017 08:34 PM, Nathan Sidwell wrote:
> We now warn on casts to T const.  Applied as obvious to fix bootstrap.

And this fixes c-common.c

nathan
diff mbox

Patch

2017-05-24  Nathan Sidwell  <nathan@acm.org>

	* c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
	const casts to avoid warning.

Index: c-common.c
===================================================================
--- c-common.c	(revision 248441)
+++ c-common.c	(working copy)
@@ -5866,8 +5866,8 @@  check_builtin_function_arguments (locati
 int
 field_decl_cmp (const void *x_p, const void *y_p)
 {
-  const tree *const x = (const tree *const) x_p;
-  const tree *const y = (const tree *const) y_p;
+  const tree *const x = (const tree *) x_p;
+  const tree *const y = (const tree *) y_p;
 
   if (DECL_NAME (*x) == DECL_NAME (*y))
     /* A nontype is "greater" than a type.  */
@@ -5892,8 +5892,8 @@  pointer operator in resort_data.  */
 static int
 resort_field_decl_cmp (const void *x_p, const void *y_p)
 {
-  const tree *const x = (const tree *const) x_p;
-  const tree *const y = (const tree *const) y_p;
+  const tree *const x = (const tree *) x_p;
+  const tree *const y = (const tree *) y_p;
 
   if (DECL_NAME (*x) == DECL_NAME (*y))
     /* A nontype is "greater" than a type.  */