NetBSD Problem Report #50667

From www@NetBSD.org  Sun Jan 17 09:27:06 2016
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.NetBSD.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 883347ABFC
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 17 Jan 2016 09:27:06 +0000 (UTC)
Message-Id: <20160117092705.69BB47ACBC@mollari.NetBSD.org>
Date: Sun, 17 Jan 2016 09:27:05 +0000 (UTC)
From: dcb314@hotmail.com
Reply-To: dcb314@hotmail.com
To: gnats-bugs@NetBSD.org
Subject: [src/sys/arch/alpha/alpha/interrupt.c:522]: (error) va_list 'ap' used before va_start() was called.
X-Send-Pr-Version: www-1.0

>Number:         50667
>Category:       port-alpha
>Synopsis:       [src/sys/arch/alpha/alpha/interrupt.c:522]: (error) va_list 'ap' used before va_start() was called.
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    port-alpha-maintainer
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jan 17 09:30:00 +0000 2016
>Closed-Date:    Sun Jan 17 10:45:41 +0000 2016
>Last-Modified:  Sun Jan 17 10:45:41 +0000 2016
>Originator:     David Binderman
>Release:        cvs dated 20160116
>Organization:
>Environment:
>Description:
void
rlprintf(struct timeval *t, const char *fmt, ...)
{
    va_list ap;
    static const struct timeval msgperiod[1] = {{ 5, 0 }};

    if (ratecheck(t, msgperiod))
        vprintf(fmt, ap);
}

I think ap needs to be initialised to something before use.
>How-To-Repeat:

>Fix:

>Release-Note:

>Audit-Trail:
From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/50667 CVS commit: src/sys/arch/alpha/alpha
Date: Sun, 17 Jan 2016 10:44:57 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Sun Jan 17 10:44:57 UTC 2016

 Modified Files:
 	src/sys/arch/alpha/alpha: interrupt.c

 Log Message:
 PR port-alpha/50667: add missing va_start/va_end.


 To generate a diff of this commit:
 cvs rdiff -u -r1.80 -r1.81 src/sys/arch/alpha/alpha/interrupt.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->closed
State-Changed-By: martin@NetBSD.org
State-Changed-When: Sun, 17 Jan 2016 10:45:41 +0000
State-Changed-Why:
Fixed, thanks for the report!


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.