[polly] r302621 - Add noreturn attribute to avoid warnings about missing initialization
Tobias Grosser via llvm-commits
llvm-commits at lists.llvm.org
Tue May 9 22:20:57 PDT 2017
Author: grosser
Date: Wed May 10 00:20:56 2017
New Revision: 302621
URL: http://llvm.org/viewvc/llvm-project?rev=302621&view=rev
Log:
Add noreturn attribute to avoid warnings about missing initialization
Before this change we saw warnings such as:
tools/GPURuntime/GPUJIT.c:1566:3:
warning: variable 'DevPtr' is used uninitialized whenever switch default is
taken [-Wsometimes-uninitialized]
default:
Modified:
polly/trunk/tools/GPURuntime/GPUJIT.c
Modified: polly/trunk/tools/GPURuntime/GPUJIT.c
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/tools/GPURuntime/GPUJIT.c?rev=302621&r1=302620&r2=302621&view=diff
==============================================================================
--- polly/trunk/tools/GPURuntime/GPUJIT.c (original)
+++ polly/trunk/tools/GPURuntime/GPUJIT.c Wed May 10 00:20:56 2017
@@ -49,6 +49,7 @@ static void debug_print(const char *form
#define KERNEL_CACHE_SIZE 10
+static void err_runtime() __attribute__((noreturn));
static void err_runtime() {
fprintf(stderr, "Runtime not correctly initialized.\n");
exit(-1);
More information about the llvm-commits
mailing list