[coreboot-gerrit] Patch set updated for coreboot: 774c897 romcc.c: Fixes warning about unused function from unused macros.

Edward O'Callaghan (eocallaghan@alterapraxis.com) gerrit at coreboot.org
Sun Mar 16 08:06:23 CET 2014


Edward O'Callaghan (eocallaghan at alterapraxis.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/5273

-gerrit

commit 774c89762a1a3f48d1d9c2e07b6a2740e725b1b0
Author: Edward O'Callaghan <eocallaghan at alterapraxis.com>
Date:   Thu Feb 20 19:37:42 2014 +1100

    romcc.c: Fixes warning about unused function from unused macros.
    
    GCC suppresses warnings about unused static functions if they are
    inline, however Clang only does this for header files. None of these
    MASK_ declarations are used, so just remove them.
    
    Change-Id: Ia230beba3f6367237838d9b3d90536459e1d52cb
    Signed-off-by: Edward O'Callaghan <eocallaghan at alterapraxis.com>
---
 util/romcc/romcc.c | 13 -------------
 1 file changed, 13 deletions(-)

diff --git a/util/romcc/romcc.c b/util/romcc/romcc.c
index fb6a5e1..84270bb 100644
--- a/util/romcc/romcc.c
+++ b/util/romcc/romcc.c
@@ -5646,19 +5646,6 @@ static struct type *invalid_type(struct compile_state *state, struct type *type)
 
 }
 
-#define MASK_UCHAR(X)    ((X) & ((ulong_t)0xff))
-#define MASK_USHORT(X)   ((X) & (((ulong_t)1 << (SIZEOF_SHORT)) - 1))
-static inline ulong_t mask_uint(ulong_t x)
-{
-	if (SIZEOF_INT < SIZEOF_LONG) {
-		ulong_t mask = (1ULL << ((ulong_t)(SIZEOF_INT))) -1;
-		x &= mask;
-	}
-	return x;
-}
-#define MASK_UINT(X)      (mask_uint(X))
-#define MASK_ULONG(X)    (X)
-
 static struct type void_type    = { .type  = TYPE_VOID };
 static struct type char_type    = { .type  = TYPE_CHAR };
 static struct type uchar_type   = { .type  = TYPE_UCHAR };



More information about the coreboot-gerrit mailing list