Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/sparc64/sparc64 Slightly rearange stopcounter() to ...



details:   https://anonhg.NetBSD.org/src/rev/2b5b1d1677d9
branches:  trunk
changeset: 789890:2b5b1d1677d9
user:      martin <martin%NetBSD.org@localhost>
date:      Thu Sep 12 12:45:53 2013 +0000

description:
Slightly rearange stopcounter() to compile warning-free with newer gcc

diffstat:

 sys/arch/sparc64/sparc64/clock.c |  11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diffs (33 lines):

diff -r 155f6319514b -r 2b5b1d1677d9 sys/arch/sparc64/sparc64/clock.c
--- a/sys/arch/sparc64/sparc64/clock.c  Thu Sep 12 12:42:18 2013 +0000
+++ b/sys/arch/sparc64/sparc64/clock.c  Thu Sep 12 12:45:53 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: clock.c,v 1.112 2013/09/10 16:03:48 macallan Exp $ */
+/*     $NetBSD: clock.c,v 1.113 2013/09/12 12:45:53 martin Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -55,7 +55,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.112 2013/09/10 16:03:48 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.113 2013/09/12 12:45:53 martin Exp $");
 
 #include "opt_multiprocessor.h"
 
@@ -352,10 +352,11 @@
 void
 stopcounter(struct timer_4u *creg)
 {
+       volatile struct timer_4u *reg = creg;
+
        /* Stop the clock */
-       volatile int discard;
-       discard = creg->t_limit;
-       creg->t_limit = 0;
+       (void)reg->t_limit;
+       reg->t_limit = 0;
 }
 
 /*



Home | Main Index | Thread Index | Old Index