From owner-freebsd-bugs Tue Nov 16 9:30:14 1999 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id D84F715238 for ; Tue, 16 Nov 1999 09:30:01 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id JAA96509; Tue, 16 Nov 1999 09:30:01 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by hub.freebsd.org (Postfix) with ESMTP id 1304414D9E for ; Tue, 16 Nov 1999 09:22:34 -0800 (PST) (envelope-from wollman@khavrinen.lcs.mit.edu) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.9.3/8.9.3) id MAA12167; Tue, 16 Nov 1999 12:22:34 -0500 (EST) (envelope-from wollman) Message-Id: <199911161722.MAA12167@khavrinen.lcs.mit.edu> Date: Tue, 16 Nov 1999 12:22:34 -0500 (EST) From: Garrett Wollman Reply-To: wollman@khavrinen.lcs.mit.edu To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: bin/14925: getsubopt isn't poisonous enough Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 14925 >Category: bin >Synopsis: getsubopt isn't poisonous enough >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Nov 16 09:30:00 PST 1999 >Closed-Date: >Last-Modified: >Originator: Garrett Wollman >Release: FreeBSD 4.0-CURRENT i386 >Organization: MIT Laboratory for Computer Science >Environment: -current sources as of today >Description: The second argument to getsubopt(3) is declared as a `pointer to const pointer to char'. Since the contents of the tokens array are typically string literals, and since getsubopt(3) doesn't make any attempt to change them, it would be better declared as `pointer to const pointer to const char' (`const char * const * tokens') so that code can be compiled with const string literals (`-Wwrite-strings'). This is unfortunately type-incompatible with existing programs, and SUSv2 codifies the bogus type. >How-To-Repeat: man getsubopt >Fix: Complain to P1003 so that this mistake doesn't get carried over into the POSIX update. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message