From b07a3d3f1f5ff041e755110a451bb6c75a8a7231 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Mon, 13 Feb 2012 21:48:22 -0600 Subject: 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.) --- toys/sort.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toys/sort.c b/toys/sort.c index 94729ee1..fabff694 100644 --- a/toys/sort.c +++ b/toys/sort.c @@ -308,7 +308,7 @@ static void sort_read(int fd, char *name) 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; -- cgit v1.2.3