From 7bbb7852b228bf3d25d889f5fb0ace23518f8299 Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Mon, 26 Nov 2007 09:33:45 +0000 Subject: [PATCH] Fixed warning regarding incompatible types in return. [r16841] --- ir/be/beschedrss.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ir/be/beschedrss.c b/ir/be/beschedrss.c index 4657f9a0d..b0e586cb6 100644 --- a/ir/be/beschedrss.c +++ b/ir/be/beschedrss.c @@ -300,7 +300,7 @@ static const ir_node **build_sorted_array_from_list(plist_t *irn_list, struct ob plist_element_t *el; int i = 0; int len = plist_count(irn_list); - ir_node **arr = (ir_node **) NEW_ARR_D(ir_node *, obst, len); + const ir_node **arr = (const ir_node**)NEW_ARR_D(ir_node*, obst, len); /* copy the list into the array */ foreach_plist(irn_list, el) { @@ -308,7 +308,8 @@ static const ir_node **build_sorted_array_from_list(plist_t *irn_list, struct ob } /* sort the array by node index */ - qsort(arr, len, sizeof(arr[0]), cmp_irn_idx); + /* HACK cast for MSVC */ + qsort((void*)arr, len, sizeof(arr[0]), cmp_irn_idx); return arr; } -- 2.20.1