systemtap/systemtap-sdt.patch
2011-07-15 15:07:33 -04:00

31 lines
1.2 KiB
Diff

From c02332052959e4213a59ce0ff40354f51506103a Mon Sep 17 00:00:00 2001
From: Mark Wielaard <mjw@redhat.com>
Date: Wed, 6 Jul 2011 23:07:51 +0200
Subject: [PATCH] Silence sys/sdt.h comparison of unsigned expression < 0 is always false.
Some arm g++ setups would complain about the wchar_t "signedness detection":
sys/sdt.h:102: error: comparison of unsigned expression < 0 is always false
jistone said: "((T)(-1) < 1)" would still get the right boolean value,
and shouldn't trigger range errors like "unsigned is never < 0".
---
includes/sys/sdt.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/includes/sys/sdt.h b/includes/sys/sdt.h
index f7e1360..0a9fd40 100644
--- a/includes/sys/sdt.h
+++ b/includes/sys/sdt.h
@@ -77,7 +77,7 @@ struct __sdt_type
#define __SDT_ALWAYS_SIGNED(T) \
template<> struct __sdt_type<T> { static const bool __sdt_signed = true; };
#define __SDT_COND_SIGNED(T) \
-template<> struct __sdt_type<T> { static const bool __sdt_signed = ((T)(-1) < 0); };
+template<> struct __sdt_type<T> { static const bool __sdt_signed = ((T)(-1) < 1); };
__SDT_ALWAYS_SIGNED(signed char)
__SDT_ALWAYS_SIGNED(short)
__SDT_ALWAYS_SIGNED(int)
--
1.7.3.4