From owner-freebsd-bugs@FreeBSD.ORG Fri Feb 1 11:50:01 2013 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 8EAE5572 for ; Fri, 1 Feb 2013 11:50:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 5CF40EDF for ; Fri, 1 Feb 2013 11:50:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r11Bo17Z086736 for ; Fri, 1 Feb 2013 11:50:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r11Bo1uX086731; Fri, 1 Feb 2013 11:50:01 GMT (envelope-from gnats) Resent-Date: Fri, 1 Feb 2013 11:50:01 GMT Resent-Message-Id: <201302011150.r11Bo1uX086731@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Andrey Simonenko Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 08C6C4DD for ; Fri, 1 Feb 2013 11:43:51 +0000 (UTC) (envelope-from simon@comsys.ntu-kpi.kiev.ua) Received: from comsys.kpi.ua (comsys.kpi.ua [77.47.192.42]) by mx1.freebsd.org (Postfix) with ESMTP id 999CFEA8 for ; Fri, 1 Feb 2013 11:43:50 +0000 (UTC) Received: from pm513-1.comsys.kpi.ua ([10.18.52.101] helo=pm513-1.comsys.ntu-kpi.kiev.ua) by comsys.kpi.ua with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1U1F24-0000Yq-0L for FreeBSD-gnats-submit@freebsd.org; Fri, 01 Feb 2013 13:43:48 +0200 Received: by pm513-1.comsys.ntu-kpi.kiev.ua (Postfix, from userid 1001) id 309701CC1E; Fri, 1 Feb 2013 13:43:46 +0200 (EET) Message-Id: <20130201114346.GA35697@pm513-1.comsys.ntu-kpi.kiev.ua> Date: Fri, 1 Feb 2013 13:43:46 +0200 From: Andrey Simonenko To: FreeBSD-gnats-submit@freebsd.org Subject: kern/175759: Correct data types for fields of struct qm_trace{} from X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Feb 2013 11:50:01 -0000 >Number: 175759 >Category: kern >Synopsis: Correct data types for fields of struct qm_trace{} from >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri Feb 01 11:50:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Andrey Simonenko >Release: FreeBSD 9.1-STABLE amd64 >Organization: >Environment: >Description: If QUEUE_MACRO_DEBUG is defined and WARNS >= 4, then a program that uses some macro definitions from cannot be built because of "warning: assignment discards qualifiers from pointer target type" warnings. 1. File name fields should have "const char *" type. 2. Line number fields should have "long" or "unsigned long" type, considering C99 standard and its values for [U]INT_MAX, __LINE__ and #line. >How-To-Repeat: >Fix: --- queue.h.orig 2012-12-11 21:00:44.000000000 +0200 +++ queue.h 2013-01-31 13:37:13.000000000 +0200 @@ -105,10 +105,10 @@ #ifdef QUEUE_MACRO_DEBUG /* Store the last 2 places the queue element or head was altered */ struct qm_trace { - char * lastfile; - int lastline; - char * prevfile; - int prevline; + const char *lastfile; + unsigned long lastline; + const char *prevfile; + unsigned long prevline; }; #define TRACEBUF struct qm_trace trace; >Release-Note: >Audit-Trail: >Unformatted: