r244312 - Silence tools/clang/lib/Tooling/CompilationDatabase.cpp:328:12: warning:
Yaron Keren via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 7 09:37:02 PDT 2015
r244326, thanks!
2015-08-07 19:11 GMT+03:00 Yaron Keren <yaron.keren at gmail.com>:
> We have LLVM_ATTRIBUTE_UNUSED, I'll check if it works as advertised.
>
>
> 2015-08-07 19:02 GMT+03:00 David Blaikie <dblaikie at gmail.com>:
>
>>
>>
>> On Fri, Aug 7, 2015 at 3:15 AM, Yaron Keren via cfe-commits <
>> cfe-commits at lists.llvm.org> wrote:
>>
>>> Author: yrnkrn
>>> Date: Fri Aug 7 05:15:15 2015
>>> New Revision: 244312
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=244312&view=rev
>>> Log:
>>> Silence tools/clang/lib/Tooling/CompilationDatabase.cpp:328:12: warning:
>>> ‘clang::tooling::JSONAnchorDest’ defined but not used [-Wunused-variable]
>>> from gcc 5.1.
>>>
>>>
>>> Modified:
>>> cfe/trunk/lib/Tooling/CompilationDatabase.cpp
>>>
>>> Modified: cfe/trunk/lib/Tooling/CompilationDatabase.cpp
>>> URL:
>>> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Tooling/CompilationDatabase.cpp?rev=244312&r1=244311&r2=244312&view=diff
>>>
>>> ==============================================================================
>>> --- cfe/trunk/lib/Tooling/CompilationDatabase.cpp (original)
>>> +++ cfe/trunk/lib/Tooling/CompilationDatabase.cpp Fri Aug 7 05:15:15
>>> 2015
>>> @@ -325,7 +325,7 @@ namespace tooling {
>>> // This anchor is used to force the linker to link in the generated
>>> object file
>>> // and thus register the JSONCompilationDatabasePlugin.
>>> extern volatile int JSONAnchorSource;
>>> -static int JSONAnchorDest = JSONAnchorSource;
>>>
>>
>> Perhaps this just needs __attribute__((used)) or __attribute__((unused))
>> (probably the latter) - I imagine we have macros for those?
>>
>>
>>> +int JSONAnchorDest = JSONAnchorSource;
>>>
>>> } // end namespace tooling
>>> } // end namespace clang
>>>
>>>
>>> _______________________________________________
>>> cfe-commits mailing list
>>> cfe-commits at lists.llvm.org
>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>>>
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150807/49bd98e1/attachment.html>
More information about the cfe-commits
mailing list