libc: Raise WARNS to 1 and fix warnings.
authorSascha Wildner <saw@online.de>
Mon, 23 Sep 2013 18:33:02 +0000 (20:33 +0200)
committerSascha Wildner <saw@online.de>
Mon, 23 Sep 2013 18:33:40 +0000 (20:33 +0200)
commit450f08dbfd98cded95c51be4079ef10f5adb3241
treed46214cfc44e8a8e8cfabac15c74533c9d4fa764
parent9a4ae890ff915f1231038c2d27e067152f4c19fb
libc: Raise WARNS to 1 and fix warnings.

* Raise the priorities of our constructor functions from 0 to 101 because
  0-100 are reserved priorities. This results in no change in object code
  (as per comparison using hexdump(1)).

* Provide a prototype for _pthread_init_early().

* Be less strict in the exclusion of gdtoa's files to also match the files
  outside contrib/ (in lib/libc/gdtoa/). Do the same for libc_rtld.

* Also fix an ignored attribute warning due to __thread being defined
  empty in libc_rtld.

Note that the most important aspect of this commit is that it causes libc
to no longer be built with -w (suppress all warnings). This was the result
of a hack we have to ignore warnings for gdtoa (which resides in contrib/).
But in conjunction with WARNS being 0 it led to -w being set for _all_
files of libc.

Removing -w causes all the warnings which are enabled by default (even
without any -W options) to trigger again, in addition the few -W options
that WARNS=1 actually sets.

Thanks to aggelos for useful clues.
lib/libc/Makefile
lib/libc/Makefile.inc
lib/libc/gen/_pthread_stubs.c
lib/libc/stdlib/dmalloc.c
lib/libc/stdlib/nmalloc.c
lib/libc_rtld/Makefile