git: libc: Raise WARNS to 1 and fix warnings.

Sascha Wildner swildner at crater.dragonflybsd.org
Mon Sep 23 11:34:01 PDT 2013


commit 450f08dbfd98cded95c51be4079ef10f5adb3241
Author: Sascha Wildner <saw at online.de>
Date:   Mon Sep 23 20:33:02 2013 +0200

    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.

Summary of changes:
 lib/libc/Makefile             |  2 +-
 lib/libc/Makefile.inc         |  2 +-
 lib/libc/gen/_pthread_stubs.c |  3 ++-
 lib/libc/stdlib/dmalloc.c     |  2 +-
 lib/libc/stdlib/nmalloc.c     | 15 +++++++++++----
 lib/libc_rtld/Makefile        |  4 ++++
 6 files changed, 20 insertions(+), 8 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/450f08dbfd98cded95c51be4079ef10f5adb3241


-- 
DragonFly BSD source repository


More information about the Commits mailing list