Module Name: src
Committed By: christos
Date: Sun Jul 24 14:00:36 UTC 2011
Modified Files:
src/tests/lib/libc/ssp: h_raw.c
Log Message:
make sum volatile to avoid printing
To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/lib/libc/ssp/h_raw.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/tests/lib/libc/ssp/h_raw.c
diff -u src/tests/lib/libc/ssp/h_raw.c:1.5 src/tests/lib/libc/ssp/h_raw.c:1.6
--- src/tests/lib/libc/ssp/h_raw.c:1.5 Sat Jul 23 18:17:43 2011
+++ src/tests/lib/libc/ssp/h_raw.c Sun Jul 24 10:00:36 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: h_raw.c,v 1.5 2011/07/23 22:17:43 martin Exp $ */
+/* $NetBSD: h_raw.c,v 1.6 2011/07/24 14:00:36 christos Exp $ */
/*
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
#include <sys/cdefs.h>
__COPYRIGHT("@(#) Copyright (c) 2011\
The NetBSD Foundation, inc. All rights reserved.");
-__RCSID("$NetBSD: h_raw.c,v 1.5 2011/07/23 22:17:43 martin Exp $");
+__RCSID("$NetBSD: h_raw.c,v 1.6 2011/07/24 14:00:36 christos Exp $");
#include <stdio.h>
#include <stdlib.h>
@@ -40,12 +40,11 @@
poke(int *b, size_t index)
{
size_t i;
- int sum = 0;
+ volatile int sum = 0;
b[index] = 42;
for (i = 0; i < 10; i++)
sum += b[i];
- printf("dummy value: %d\n", sum);
}
int