From owner-freebsd-arch@FreeBSD.ORG Sun May 28 16:43:34 2006 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9E20316AAB5 for ; Sun, 28 May 2006 16:43:34 +0000 (UTC) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (comp.chem.msu.su [158.250.32.97]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9952943D46 for ; Sun, 28 May 2006 16:43:33 +0000 (GMT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (localhost [127.0.0.1]) by comp.chem.msu.su (8.13.4/8.13.3) with ESMTP id k4SGhTHx084908 for ; Sun, 28 May 2006 20:43:29 +0400 (MSD) (envelope-from yar@comp.chem.msu.su) Received: (from yar@localhost) by comp.chem.msu.su (8.13.4/8.13.3/Submit) id k4SGhTNx084907 for freebsd-arch@freebsd.org; Sun, 28 May 2006 20:43:29 +0400 (MSD) (envelope-from yar) Date: Sun, 28 May 2006 20:43:28 +0400 From: Yar Tikhiy To: freebsd-arch@freebsd.org Message-ID: <20060528164328.GA84031@comp.chem.msu.su> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.9i Subject: Can fts_open() be constified further? X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2006 16:43:35 -0000 Hi folks, Currently, fts_open() is declared as follows: FTS * fts_open(char * const *path_argv, int options, int (*compar)(const FTSENT * const *, const FTSENT * const *)); This means that one cannot pass pointers to constant strings in path_argv[] without getting rather justified warnings from cc. AFAIK, fts(3) functions aren't supposed to modify the path strings. Hence the prototype asks to be changed slightly: fts_open(const char * const *path_argv, int options, ^^^^^ This shouldn't break fts consumers because a pointer to a variable can be converted to a pointer to a constant w/o warnings (but not the other way around.) Can anybody see other possible side effects from such change? -- Yar