diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2013-05-18 17:49:32 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2013-05-18 17:55:07 -0700 |
commit | 478dade09a4288f73e963b7f185ef9f73b681b42 (patch) | |
tree | df50bffa4c4d045b20ead3e3d945e39108088acc /src/sort.c | |
parent | e605e40acf859eea2a1221d867ab3c086a1a1c15 (diff) | |
download | coreutils-478dade09a4288f73e963b7f185ef9f73b681b42.tar.xz |
maint: port --enable-gcc-warnings to clang
* configure.ac: If clang, add -Wno-format-extra-args and
-Wno-tautological-constant-out-of-range-compare.
* gl/lib/rand-isaac.c (ind):
* gl/lib/randread.c (readisaac):
* src/ls.c (dev_ino_push, dev_ino_pop):
* src/sort.c (buffer_linelim):
* src/system.h (is_nul):
* src/tail.c (tail_forever_inotify):
Rewrite to avoid casts that clang dislikes.
It's good to avoid casts anyway.
* src/expr.c (integer_overflow): Declare only if it exists.
(die): Remove; unused.
* src/ls.c (dev_ino_push): New function, replacing ...
(DEV_INO_PUSH): ... this removed macro. All uses changed.
(decode_switches): Rewrite "str"+i to &str[i].
Diffstat (limited to 'src/sort.c')
-rw-r--r-- | src/sort.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/sort.c b/src/sort.c index 7410abca6..062b5f946 100644 --- a/src/sort.c +++ b/src/sort.c @@ -1557,7 +1557,8 @@ initbuf (struct buffer *buf, size_t line_bytes, size_t alloc) static inline struct line * buffer_linelim (struct buffer const *buf) { - return (struct line *) (buf->buf + buf->alloc); + void *linelim = buf->buf + buf->alloc; + return linelim; } /* Return a pointer to the first character of the field specified |