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

Sascha Wildner swildner at crater.dragonflybsd.org
Wed Sep 25 12:47:02 PDT 2013


commit 278e99f65e814d7799e654568a719887e1954887
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)).
    
    * Fix a bug in the stack protector code.
    
    * 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/sys/stack_protector.c |  2 +-
 lib/libc_rtld/Makefile         |  4 ++++
 7 files changed, 21 insertions(+), 9 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/278e99f65e814d7799e654568a719887e1954887


-- 
DragonFly BSD source repository



More information about the Commits mailing list