This is an automated email from Gerrit.

Matthias Welwarsky ([email protected]) just uploaded a new patch set to 
Gerrit, which you can find at http://openocd.zylin.com/4118

-- gerrit

commit 0abaa796c690f46f08d388550d02686805e5645e
Author: Matthias Welwarsky <[email protected]>
Date:   Tue May 2 16:47:21 2017 +0200

    Fix compile failure on MacOSX
    
    MacOSX tool chain defines __unused in "sys/cdefs.h", causing a collision.
    Remove the local define to avoid the compilers internal symbold namespace.
    
    Change-Id: I16370c4518e6aeec482dd689e7db80628f846ee3
    Signed-off-by: Matthias Welwarsky <[email protected]>

diff --git a/src/target/aarch64.c b/src/target/aarch64.c
index e647bba..5e5d3fc 100644
--- a/src/target/aarch64.c
+++ b/src/target/aarch64.c
@@ -30,8 +30,6 @@
 #include "armv8_cache.h"
 #include <helper/time_support.h>
 
-#define __unused __attribute((unused))
-
 enum restart_mode {
        RESTART_LAZY,
        RESTART_SYNC,
diff --git a/src/target/armv8.c b/src/target/armv8.c
index db7a871..ae56ffd 100644
--- a/src/target/armv8.c
+++ b/src/target/armv8.c
@@ -37,8 +37,6 @@
 #include "target.h"
 #include "target_type.h"
 
-#define __unused __attribute__((unused))
-
 static const char * const armv8_state_strings[] = {
        "AArch32", "Thumb", "Jazelle", "ThumbEE", "AArch64",
 };
@@ -610,7 +608,7 @@ done:
        /* (void) */ dpm->finish(dpm);
 }
 
-static __unused void armv8_show_fault_registers(struct target *target)
+static __attribute((unused)) void armv8_show_fault_registers(struct target 
*target)
 {
        struct armv8_common *armv8 = target_to_armv8(target);
 
@@ -647,7 +645,7 @@ static uint8_t armv8_pa_size(uint32_t ps)
        return ret;
 }
 
-static __unused int armv8_read_ttbcr32(struct target *target)
+static __attribute((unused)) int armv8_read_ttbcr32(struct target *target)
 {
        struct armv8_common *armv8 = target_to_armv8(target);
        struct arm_dpm *dpm = armv8->arm.dpm;
@@ -686,7 +684,7 @@ done:
        return retval;
 }
 
-static __unused int armv8_read_ttbcr(struct target *target)
+static __attribute((unused)) int armv8_read_ttbcr(struct target *target)
 {
        struct armv8_common *armv8 = target_to_armv8(target);
        struct arm_dpm *dpm = armv8->arm.dpm;

-- 

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to