lkml.org 
[lkml]   [2014]   [Mar]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] module: LLVMLinux: Remove unused function warning from __param_check macro
Date
behanw@converseincode.com writes:
> From: Mark Charlebois <charlebm@gmail.com>
>
> This code makes a compile time type check that is optimized away. Clang
> complains that it generates an unused function.
>
> I believe GCC won't complain for a static inline fuction but would if it
> was just a static function.
>
> Adding the unused attribute to the function declaration removes the warning.
>
> This code works for both gcc and clang.
>
> Signed-off-by: Mark Charlebois <charlebm@gmail.com>
> Signed-off-by: Behan Webster <behanw@converseincode.com>

Please include the actual warning clang spits out. That helps because
(1) I know what you're referring to, and
(2) it helps others if they are later googling for the error.

I don't have any huge objections to this patch (__always_unused) though.

Thanks,
Rusty.


\
 
 \ /
  Last update: 2014-03-11 09:23    [W:0.128 / U:0.400 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site