Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/lib/libc/ssp make sum volatile to avoid printing
details: https://anonhg.NetBSD.org/src/rev/1bc314035b3b
branches: trunk
changeset: 767612:1bc314035b3b
user: christos <christos%NetBSD.org@localhost>
date: Sun Jul 24 14:00:36 2011 +0000
description:
make sum volatile to avoid printing
diffstat:
tests/lib/libc/ssp/h_raw.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diffs (32 lines):
diff -r 5844d6805695 -r 1bc314035b3b tests/lib/libc/ssp/h_raw.c
--- a/tests/lib/libc/ssp/h_raw.c Sun Jul 24 12:31:33 2011 +0000
+++ b/tests/lib/libc/ssp/h_raw.c Sun Jul 24 14:00:36 2011 +0000
@@ -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
Home |
Main Index |
Thread Index |
Old Index