[llvm-commits] [test-suite] r108202 - in /test-suite/trunk/MultiSource: Applications/sgefa/blas.c Applications/sgefa/sgesl.c Benchmarks/MallocBench/espresso/cvrm.c Benchmarks/MallocBench/espresso/cvrout.c Benchmarks/MallocBench/espresso/hack.c Benchmarks/MallocBench/espresso/pair.c Benchmarks/McCat/09-vor/splay.c Benchmarks/McCat/09-vor/splay2.c
Daniel Dunbar
daniel at zuster.org
Mon Jul 12 15:30:06 PDT 2010
Author: ddunbar
Date: Mon Jul 12 17:30:06 2010
New Revision: 108202
URL: http://llvm.org/viewvc/llvm-project?rev=108202&view=rev
Log:
Fix some -Wreturn-value problems, which Clang now errors on.
Modified:
test-suite/trunk/MultiSource/Applications/sgefa/blas.c
test-suite/trunk/MultiSource/Applications/sgefa/sgesl.c
test-suite/trunk/MultiSource/Benchmarks/MallocBench/espresso/cvrm.c
test-suite/trunk/MultiSource/Benchmarks/MallocBench/espresso/cvrout.c
test-suite/trunk/MultiSource/Benchmarks/MallocBench/espresso/hack.c
test-suite/trunk/MultiSource/Benchmarks/MallocBench/espresso/pair.c
test-suite/trunk/MultiSource/Benchmarks/McCat/09-vor/splay.c
test-suite/trunk/MultiSource/Benchmarks/McCat/09-vor/splay2.c
Modified: test-suite/trunk/MultiSource/Applications/sgefa/blas.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/MultiSource/Applications/sgefa/blas.c?rev=108202&r1=108201&r2=108202&view=diff
==============================================================================
--- test-suite/trunk/MultiSource/Applications/sgefa/blas.c (original)
+++ test-suite/trunk/MultiSource/Applications/sgefa/blas.c Mon Jul 12 17:30:06 2010
@@ -431,12 +431,12 @@
if( incx < 0 ) sx += (-n+1)*incx;
for( i=0; i<n; i++, sx+=incx )
*sx *= sa;
- return;
+ return 0;
}
/* Code for unit increment. */
for( i=0; i<n; i++, sx++ )
*sx *= sa;
- return;
+ return 0;
}
void vexopy( n, v, x, y, itype )
int n, itype;
Modified: test-suite/trunk/MultiSource/Applications/sgefa/sgesl.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/MultiSource/Applications/sgefa/sgesl.c?rev=108202&r1=108201&r2=108202&view=diff
==============================================================================
--- test-suite/trunk/MultiSource/Applications/sgefa/sgesl.c (original)
+++ test-suite/trunk/MultiSource/Applications/sgefa/sgesl.c Mon Jul 12 17:30:06 2010
@@ -72,7 +72,7 @@
for( i=0, uik=a->pd[k]; i<k; i++, uik++ )
b[i] -= (*uik)*b[k];
}
- return;
+ return 0;
}
/* job = nonzero. Solve trans(a) * x = b. */
@@ -99,5 +99,5 @@
b[l] = b[k];
b[k] = t;
}
- return;
+ return 0;
}
Modified: test-suite/trunk/MultiSource/Benchmarks/MallocBench/espresso/cvrm.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/MultiSource/Benchmarks/MallocBench/espresso/cvrm.c?rev=108202&r1=108201&r2=108202&view=diff
==============================================================================
--- test-suite/trunk/MultiSource/Benchmarks/MallocBench/espresso/cvrm.c (original)
+++ test-suite/trunk/MultiSource/Benchmarks/MallocBench/espresso/cvrm.c Mon Jul 12 17:30:06 2010
@@ -368,7 +368,7 @@
/* Call a routine to do something with the cover */
if ((*func)(PLA1, i) == 0) {
free_PLA(PLA1);
- return;
+ return 0;
}
/* intersect with the particular output part again */
@@ -379,7 +379,7 @@
/* Call a routine to do something with the final result */
if ((*func1)(PLA1, i) == 0) {
free_PLA(PLA1);
- return;
+ return 0;
}
/* Cleanup for next go-around */
Modified: test-suite/trunk/MultiSource/Benchmarks/MallocBench/espresso/cvrout.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/MultiSource/Benchmarks/MallocBench/espresso/cvrout.c?rev=108202&r1=108201&r2=108202&view=diff
==============================================================================
--- test-suite/trunk/MultiSource/Benchmarks/MallocBench/espresso/cvrout.c (original)
+++ test-suite/trunk/MultiSource/Benchmarks/MallocBench/espresso/cvrout.c Mon Jul 12 17:30:06 2010
@@ -504,7 +504,7 @@
int size, var, npermute, *permute, *weight, noweight;
if ((cube.num_vars - cube.num_binary_vars) <= 1) {
- return;
+ return 0;
}
makeup_labels(PLA);
Modified: test-suite/trunk/MultiSource/Benchmarks/MallocBench/espresso/hack.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/MultiSource/Benchmarks/MallocBench/espresso/hack.c?rev=108202&r1=108201&r2=108202&view=diff
==============================================================================
--- test-suite/trunk/MultiSource/Benchmarks/MallocBench/espresso/hack.c (original)
+++ test-suite/trunk/MultiSource/Benchmarks/MallocBench/espresso/hack.c Mon Jul 12 17:30:06 2010
@@ -9,7 +9,7 @@
pcube cplus, cminus, last, p;
if (PLA->label == NIL(char *) || PLA->label[0] == NIL(char))
- return;
+ return 0;
/* try to find a binary variable named "DONT_CARE" */
var = -1;
@@ -23,7 +23,7 @@
}
}
if (var == -1) {
- return;
+ return 0;
}
/* form the cofactor cubes for the don't-care variable */
@@ -408,7 +408,7 @@
/* hack with the labels */
if ((oldlabel = PLA->label) == NIL(char *))
- return;
+ return 0;
PLA->label = ALLOC(char *, new_size);
for(i = 0; i < new_size; i++) {
PLA->label[i] = NIL(char);
Modified: test-suite/trunk/MultiSource/Benchmarks/MallocBench/espresso/pair.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/MultiSource/Benchmarks/MallocBench/espresso/pair.c?rev=108202&r1=108201&r2=108202&view=diff
==============================================================================
--- test-suite/trunk/MultiSource/Benchmarks/MallocBench/espresso/pair.c (original)
+++ test-suite/trunk/MultiSource/Benchmarks/MallocBench/espresso/pair.c Mon Jul 12 17:30:06 2010
@@ -585,7 +585,7 @@
if (set_ord(candidate) < 2) {
(*action)(pair);
- return;
+ return 0;
}
recur_pair = pair_save(pair, n);
Modified: test-suite/trunk/MultiSource/Benchmarks/McCat/09-vor/splay.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/MultiSource/Benchmarks/McCat/09-vor/splay.c?rev=108202&r1=108201&r2=108202&view=diff
==============================================================================
--- test-suite/trunk/MultiSource/Benchmarks/McCat/09-vor/splay.c (original)
+++ test-suite/trunk/MultiSource/Benchmarks/McCat/09-vor/splay.c Mon Jul 12 17:30:06 2010
@@ -129,7 +129,7 @@
{
splay(root,temp->element.key);
if (temp->element.key == (*root)->element.key)
- return;
+ return 0;
else if ((*root)->element.key > temp->element.key) {
temp->left = (*root)->left;
if (temp->left != NULL) temp->left->father = temp;
@@ -165,7 +165,7 @@
else
{
printf("No elements in tree! [delete_min]\n");
- return;
+ return min_elm.p;
}
return min_elm.p;
}
Modified: test-suite/trunk/MultiSource/Benchmarks/McCat/09-vor/splay2.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/MultiSource/Benchmarks/McCat/09-vor/splay2.c?rev=108202&r1=108201&r2=108202&view=diff
==============================================================================
--- test-suite/trunk/MultiSource/Benchmarks/McCat/09-vor/splay2.c (original)
+++ test-suite/trunk/MultiSource/Benchmarks/McCat/09-vor/splay2.c Mon Jul 12 17:30:06 2010
@@ -204,7 +204,7 @@
free(max_node); }
else {
printf("No elements in tree! [CHdelete_max]\n");
- return; }
+ return 0; }
return max_elm.point;
}
More information about the llvm-commits
mailing list