NetBSD Problem Report #51848
From www@NetBSD.org Fri Jan 13 05:44:56 2017
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 CD9CD7A26A
for <gnats-bugs@gnats.NetBSD.org>; Fri, 13 Jan 2017 05:44:56 +0000 (UTC)
Message-Id: <20170113054455.ED8BE7A292@mollari.NetBSD.org>
Date: Fri, 13 Jan 2017 05:44:55 +0000 (UTC)
From: yaneurabeya@gmail.com
Reply-To: yaneurabeya@gmail.com
To: gnats-bugs@NetBSD.org
Subject: [PATCH] tests/lib/libc/sys/t_sigaction: mark variables __unused and change h_macros.h #include
X-Send-Pr-Version: www-1.0
>Number: 51848
>Category: bin
>Synopsis: [PATCH] tests/lib/libc/sys/t_sigaction: mark variables __unused and change h_macros.h #include
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Jan 13 05:45:00 +0000 2017
>Closed-Date: Mon Jan 16 19:00:49 +0000 2017
>Last-Modified: Mon Jan 16 19:00:49 +0000 2017
>Originator: Ngie Cooper
>Release: 7.0.2
>Organization:
>Environment:
n/a
>Description:
- Mark variables __unused so they compile with -Wunused
- Change h_macros.h #include to use CPPFLAGS instead of a relative path to the testcase (again, for portability reasons because of pathing differences in the FreeBSD source tree).
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
From: "Ngie Cooper (yaneurabeya)" <yaneurabeya@gmail.com>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: bin/51848: [PATCH] tests/lib/libc/sys/t_sigaction: mark variables
__unused and change h_macros.h #include
Date: Thu, 12 Jan 2017 21:46:17 -0800
--Apple-Mail=_FF174221-D0C4-4F10-9297-DBC2144CEE36
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
charset=us-ascii
Patch attached.
-Ngie
--Apple-Mail=_FF174221-D0C4-4F10-9297-DBC2144CEE36
Content-Disposition: attachment;
filename=t_sigaction-mark-__unused-and-change-h_macros.patch
Content-Type: application/octet-stream;
x-unix-mode=0644;
name="t_sigaction-mark-__unused-and-change-h_macros.patch"
Content-Transfer-Encoding: 7bit
Index: lib/libc/sys/t_sigaction.c
===================================================================
RCS file: /cvsroot/src/tests/lib/libc/sys/t_sigaction.c,v
retrieving revision 1.3
diff -u -r1.3 t_sigaction.c
--- lib/libc/sys/t_sigaction.c 4 Nov 2014 00:20:19 -0000 1.3
+++ lib/libc/sys/t_sigaction.c 13 Jan 2017 05:43:08 -0000
@@ -41,12 +41,12 @@
#include <atf-c.h>
-#include "../../../h_macros.h"
+#include "h_macros.h"
static bool handler_called = false;
static void
-handler(int signo)
+handler(int signo __unused)
{
handler_called = true;
}
@@ -79,7 +79,7 @@
}
static void
-catch(int sig)
+catch(int sig __unused)
{
return;
}
Index: lib/libc/sys/Makefile
===================================================================
RCS file: /cvsroot/src/tests/lib/libc/sys/Makefile,v
retrieving revision 1.45
diff -u -r1.45 Makefile
--- lib/libc/sys/Makefile 11 Nov 2016 15:30:44 -0000 1.45
+++ lib/libc/sys/Makefile 13 Jan 2017 05:43:08 -0000
@@ -83,6 +83,7 @@
.endif
CPPFLAGS.t_lwp_create.c += -D_KERNTYPES
+CPPFLAGS.t_sigaction.c+= -I${.CURDIR:H:H:H}
WARNS= 4
--Apple-Mail=_FF174221-D0C4-4F10-9297-DBC2144CEE36--
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/51848 CVS commit: src/tests/lib/libc/sys
Date: Fri, 13 Jan 2017 15:08:38 -0500
Module Name: src
Committed By: christos
Date: Fri Jan 13 20:08:38 UTC 2017
Modified Files:
src/tests/lib/libc/sys: t_sigaction.c
Log Message:
PR/51848: Ngie Cooper: tests/lib/libc/sys/t_sigaction: mark variables __unused
XXX: h_macros.h needs to be fixed differently.
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libc/sys/t_sigaction.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: snj@NetBSD.org
State-Changed-When: Mon, 16 Jan 2017 19:00:49 +0000
State-Changed-Why:
christos committed it (with a different fix for the h_macros.h issue).
thanks!
>Unformatted:
(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.