[coreboot] Patch merged into coreboot/master: 5ca7fab libpayload: fix compiler warning for first_cmos_entry()

gerrit at coreboot.org gerrit at coreboot.org
Fri Feb 17 19:24:36 CET 2012


the following patch was just integrated into master:
commit 5ca7fab6a2e741cddd4d86e2cf321378e807db1f
Author: Mathias Krause <mathias.krause at secunet.com>
Date:   Fri Feb 17 11:53:28 2012 +0100

    libpayload: fix compiler warning for first_cmos_entry()
    
    The 'name' argument to lookup_cmos_entry() is declared to be 'char *'
    but we pass an empty string ("") which is 'const char[]' so the compiler
    legitimatly warns about discarded qualifiers here. Fix this by passing
    NULL as 'name'.
    
    Minor nitpick: The NULL test in lookup_cmos_entry() is superfluous as our
    implementation of strnlen() can handle NULL pointers gracefully. But for
    an average C hacker it just doesn't feel right not to do so.
    
    Change-Id: I592917d12d8fa840804c0d19e38b844427064fef
    Signed-off-by: Mathias Krause <mathias.krause at secunet.com>

Build-Tested: build bot (Jenkins) at Fri Feb 17 13:44:56 2012, giving +1
Reviewed-By: Stefan Reinauer <stefan.reinauer at coreboot.org> at Fri Feb 17 19:07:05 2012, giving +2
See http://review.coreboot.org/651 for details.

-gerrit




More information about the coreboot mailing list