changeset 460:55d815926c5c

Tweak from Frank Bergmann: some broken optimizers complain about "type-punned pointers", so typecast to void * instead to shut it up. (Up there with the "may be used uninitialized" gripes.)
author Rob Landley <rob@landley.net>
date Mon, 13 Feb 2012 21:48:22 -0600
parents 1dbe91079950
children ca74293f87f1
files toys/sort.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/toys/sort.c	Mon Feb 13 21:27:50 2012 -0600
+++ b/toys/sort.c	Mon Feb 13 21:48:22 2012 -0600
@@ -308,7 +308,7 @@
         if (CFG_SORT_BIG && (toys.optflags&FLAG_c)) {
             int j = (toys.optflags&FLAG_u) ? -1 : 0;
 
-            if (TT.lines && compare_keys((char **)&TT.lines, &line)>j)
+            if (TT.lines && compare_keys((void *)&TT.lines, &line)>j)
                 error_exit("%s: Check line %d\n", name, TT.linecount);
             free(TT.lines);
             TT.lines = (char **)line;