From 1b2ad20c6811a916650a0c510724d9f1b8a7d6d1 Mon Sep 17 00:00:00 2001 From: Liong Sauw Ming Date: Mon, 21 Oct 2013 06:37:30 +0000 Subject: Re #1630 (misc): Fixed compiler warnings. Thanks to Mark Michelson for the patch. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4624 74dad513-b988-da41-8d7b-12977e46ad98 --- pjlib/include/pj/compat/cc_armcc.h | 1 + pjlib/include/pj/compat/cc_codew.h | 1 + pjlib/include/pj/compat/cc_gcc.h | 2 ++ pjlib/include/pj/compat/cc_gcce.h | 1 + pjlib/include/pj/compat/cc_msvc.h | 1 + pjlib/include/pj/compat/cc_mwcc.h | 1 + pjlib/include/pj/list.h | 2 +- 7 files changed, 8 insertions(+), 1 deletion(-) (limited to 'pjlib/include/pj') diff --git a/pjlib/include/pj/compat/cc_armcc.h b/pjlib/include/pj/compat/cc_armcc.h index b4af09c7..16f9654d 100644 --- a/pjlib/include/pj/compat/cc_armcc.h +++ b/pjlib/include/pj/compat/cc_armcc.h @@ -43,6 +43,7 @@ #define PJ_THREAD_FUNC #define PJ_NORETURN #define PJ_ATTR_NORETURN __attribute__ ((noreturn)) +#define PJ_ATTR_MAY_ALIAS __attribute__ ((__may_alias__)) #define PJ_HAS_INT64 1 diff --git a/pjlib/include/pj/compat/cc_codew.h b/pjlib/include/pj/compat/cc_codew.h index cdd5cf0a..4674a121 100644 --- a/pjlib/include/pj/compat/cc_codew.h +++ b/pjlib/include/pj/compat/cc_codew.h @@ -39,6 +39,7 @@ #define PJ_THREAD_FUNC #define PJ_NORETURN #define PJ_ATTR_NORETURN +#define PJ_ATTR_MAY_ALIAS #define PJ_HAS_INT64 1 diff --git a/pjlib/include/pj/compat/cc_gcc.h b/pjlib/include/pj/compat/cc_gcc.h index 77d93f32..df257029 100644 --- a/pjlib/include/pj/compat/cc_gcc.h +++ b/pjlib/include/pj/compat/cc_gcc.h @@ -53,11 +53,13 @@ typedef uint64_t pj_uint64_t; #define PJ_INLINE_SPECIFIER static __inline #define PJ_ATTR_NORETURN + #define PJ_ATTR_MAY_ALIAS #else typedef long long pj_int64_t; typedef unsigned long long pj_uint64_t; #define PJ_INLINE_SPECIFIER static inline #define PJ_ATTR_NORETURN __attribute__ ((noreturn)) + #define PJ_ATTR_MAY_ALIAS __attribute__((__may_alias__)) #endif #define PJ_INT64(val) val##LL diff --git a/pjlib/include/pj/compat/cc_gcce.h b/pjlib/include/pj/compat/cc_gcce.h index e3227435..06de5be6 100644 --- a/pjlib/include/pj/compat/cc_gcce.h +++ b/pjlib/include/pj/compat/cc_gcce.h @@ -39,6 +39,7 @@ #define PJ_THREAD_FUNC #define PJ_NORETURN #define PJ_ATTR_NORETURN __attribute__ ((noreturn)) +#define PJ_ATTR_MAY_ALIAS __attribute__ ((__may_alias__)) #define PJ_HAS_INT64 1 diff --git a/pjlib/include/pj/compat/cc_msvc.h b/pjlib/include/pj/compat/cc_msvc.h index 0b1fd68a..659d3a42 100644 --- a/pjlib/include/pj/compat/cc_msvc.h +++ b/pjlib/include/pj/compat/cc_msvc.h @@ -68,6 +68,7 @@ #define PJ_THREAD_FUNC #define PJ_NORETURN __declspec(noreturn) #define PJ_ATTR_NORETURN +#define PJ_ATTR_MAY_ALIAS #define PJ_HAS_INT64 1 diff --git a/pjlib/include/pj/compat/cc_mwcc.h b/pjlib/include/pj/compat/cc_mwcc.h index 1efd3205..6c9e617e 100644 --- a/pjlib/include/pj/compat/cc_mwcc.h +++ b/pjlib/include/pj/compat/cc_mwcc.h @@ -39,6 +39,7 @@ #define PJ_THREAD_FUNC #define PJ_NORETURN #define PJ_ATTR_NORETURN __attribute__ ((noreturn)) +#define PJ_ATTR_MAY_ALIAS #define PJ_HAS_INT64 1 diff --git a/pjlib/include/pj/list.h b/pjlib/include/pj/list.h index 0cc4b997..a66b821e 100644 --- a/pjlib/include/pj/list.h +++ b/pjlib/include/pj/list.h @@ -74,7 +74,7 @@ PJ_BEGIN_DECL struct pj_list { PJ_DECL_LIST_MEMBER(void); -}; +} PJ_ATTR_MAY_ALIAS; /* may_alias avoids warning with gcc-4.4 -Wall -O2 */ /** -- cgit v1.2.3