On Fri, Aug 7, 2015 at 3:15 AM, Yaron Keren via cfe-commits <
cfe-commits@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@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to