This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix building glibc master with NDEBUG.


On 03/15/2016 11:27 PM, Carlos O'Donell wrote:
> On 03/11/2016 03:44 AM, Florian Weimer wrote:
>> On 03/11/2016 03:29 AM, Carlos O'Donell wrote:
>>
>>>         * catgets/tst-catgets.c (do_bz17905): Mark result unused.
>>>         * dlfcn/bug-dl-leaf-lib.c (check_val_fini): Mark ret unused.
>>>         * math/atest-exp.c (exp_mpn): Mark chk unused.
>>>         * math/atest-exp2.c (exp_mpn): Likwise.
>>
>> Tests should not use assert because it writes the message to standard
>> error, not standard output, where it is captured.  We can add a
>> different macro to test-skeleton.c for this purpose.  It would be useful
>> in many cases.
> 
> For now I'm not going to remove the test asserts.
> 
> If we changes asserts in tests then it has to be by reviewing what
> information the assert provides, and replacing it with something
> meaningful for the test at hand. If the assert is triggering it means
> some precondition of the test is being violated and that really needs to
> be checked *always*.
> 
> I wonder if Arjun's scripts can help find all such asserts and possibly
> do an automatic transformation (he did test-skeleton.c conversions with
> a set of scripts). Arjun?
> 
>>>         * sysdeps/arm/dl-machine.h (elf_machine_rela): Mark td unused.
>>
>> This seems okay.
> 
> OK.
> 
>>>         * sysdeps/i386/i686/dl-hash.h: Mark _dl_elf_hash unused.
>>
>> This one is not related to NDEBUG, I think, but to --with-cpu.
> 
> You're absolutely right. I'll adjust my commit message to mention taht.
> 

Committed.

commit b4f518ecfad09fc4279ea26a565332835e403dab
Author: Carlos O'Donell <carlos@redhat.com>
Date:   Tue Mar 15 23:16:47 2016 -0400

    Fix building glibc master with NDEBUG and --with-cpu.
    
    When building on i686, x86_64, and arm, and with NDEBUG, or --with-cpu
    there are various variables and functions which are unused based on
    these settings.
    
    This patch marks all such variables with __attribute__((unused)) to
    avoid the compiler warnings when building with the aformentioned
    options.



-- 
Cheers,
Carlos.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]