diff mbox

[Xen-devel,04/34] xen/compiler: Introduce always_unused define

Message ID 1395766541-23979-5-git-send-email-julien.grall@linaro.org
State Deferred, archived
Headers show

Commit Message

Julien Grall March 25, 2014, 4:55 p.m. UTC
This define will be used to denote function which are never used but contains
usefull code (e.g BUILD_BUG_ON stuff).

Signed-off-by: Julien Grall <julien.grall@linaro.org>
Cc: Keir Fraser <keir@xen.org>
---
 xen/include/xen/compiler.h |    2 ++
 1 file changed, 2 insertions(+)

Comments

Stefano Stabellini March 25, 2014, 5:34 p.m. UTC | #1
On Tue, 25 Mar 2014, Julien Grall wrote:
> This define will be used to denote function which are never used but contains
                                       ^functions                      ^contain
> usefull code (e.g BUILD_BUG_ON stuff).
  ^ useful

> Signed-off-by: Julien Grall <julien.grall@linaro.org>
> Cc: Keir Fraser <keir@xen.org>
> ---
>  xen/include/xen/compiler.h |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/xen/include/xen/compiler.h b/xen/include/xen/compiler.h
> index 6e07990..07e8b80 100644
> --- a/xen/include/xen/compiler.h
> +++ b/xen/include/xen/compiler.h
> @@ -16,6 +16,8 @@
>  
>  #define noreturn      __attribute__((noreturn))
>  
> +#define always_unused __attribute__((unused))
> +
>  #define __packed      __attribute__((packed))
>  
>  #if (!defined(__clang__) && (__GNUC__ == 4) && (__GNUC_MINOR__ < 5))
> -- 
> 1.7.10.4
>
Julien Grall March 25, 2014, 5:56 p.m. UTC | #2
Hi Stefano,

On 03/25/2014 05:34 PM, Stefano Stabellini wrote:
> On Tue, 25 Mar 2014, Julien Grall wrote:
>> This define will be used to denote function which are never used but contains
>                                        ^functions                      ^contain
>> usefull code (e.g BUILD_BUG_ON stuff).
>   ^ useful

I will fix all the typoes on the next version.

Regards,
diff mbox

Patch

diff --git a/xen/include/xen/compiler.h b/xen/include/xen/compiler.h
index 6e07990..07e8b80 100644
--- a/xen/include/xen/compiler.h
+++ b/xen/include/xen/compiler.h
@@ -16,6 +16,8 @@ 
 
 #define noreturn      __attribute__((noreturn))
 
+#define always_unused __attribute__((unused))
+
 #define __packed      __attribute__((packed))
 
 #if (!defined(__clang__) && (__GNUC__ == 4) && (__GNUC_MINOR__ < 5))