mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-14 17:01:22 +00:00
29 lines
400 B
R
29 lines
400 B
R
|
#include "test-harness.h"
|
||
|
|
||
|
int counter;
|
||
|
|
||
|
int
|
||
|
function (void)
|
||
|
{
|
||
|
return ++counter;
|
||
|
}
|
||
|
|
||
|
int
|
||
|
main (void)
|
||
|
{
|
||
|
int ret = 0;
|
||
|
counter = 0;
|
||
|
//function ();
|
||
|
//if (counter != 1) {
|
||
|
//printf ("discarded return not called only once\n");
|
||
|
// ret = 1;
|
||
|
//}
|
||
|
counter = 0;
|
||
|
printf ("function: %d\n", function ());
|
||
|
if (counter != 1) {
|
||
|
//printf ("used return not called only once\n");
|
||
|
ret = 1;
|
||
|
}
|
||
|
return ret;
|
||
|
}
|