From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2 autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 12314 invoked from network); 22 Feb 2023 06:34:17 -0000 Received: from second.openwall.net (193.110.157.125) by inbox.vuxu.org with ESMTPUTF8; 22 Feb 2023 06:34:17 -0000 Received: (qmail 12253 invoked by uid 550); 22 Feb 2023 06:34:13 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 12221 invoked from network); 22 Feb 2023 06:34:12 -0000 X-Virus-Scanned: SPAM Filter at disroot.org Date: Wed, 22 Feb 2023 12:33:58 +0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1677047640; bh=RI2sX+cE7UQz7uET771BGBalovZTQ1G3uZ7Uop6foJQ=; h=Date:From:To:Subject:References:In-Reply-To; b=S9UfdqFcWrkdsIYr2gLj1OoQI8x9H8/Sjar2lcengoCoMCEt3PlhtJpLz7GLJT/MX 2alRY8fvbFsmRd+QaR0E0XJmIu+n0an4nAEy4b0LJDBiZNydwnk+uBD4a9Z0AZIvD4 G+yeyGu2KIx3nuKnetA/I8kaKdZQ9xLaNg63NIbElKUo15C8rVeNQj7WoQ7mcAIttu HGVcXwzfvqh7sbjXqijfQCZgKQ9N5OVdZmp8uTG5rgOQZEViX7shWdjJPByLno81uU 0u0uvki3hbVD/wVlDnMpX/E/knsijIHUmhVZ8iUj4JTuYpntiuxkoT+V8/eOTk2ojW lGBX62N/tDjgA== From: NRK To: musl@lists.openwall.com Message-ID: <20230222063358.wyr7rcmryk7hdnyb@gen2.localdomain> References: <99826a90-6658-099e-9df8-d0bba78b8f0f@gmail.com> <20230221160455.GF1903@voyager> <20230221212842.GG1903@voyager> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230221212842.GG1903@voyager> Subject: Re: [musl] Re: [BUG] ioctl: overflow in implicit constant conversion On Tue, Feb 21, 2023 at 10:28:42PM +0100, Markus Wichmann wrote: > Should the compiler not suppress warnings that come from system > headers? As far as I see, the warning isn't coming "from system headers". The header is only defining those constants, the user is the one who's using that constant in an `int` context. This isn't much different than the user trying to put `ULONG_MAX` into an `char` for example. And I don't see how the compiler can "fix" it unless you introduce some sort of "this constant is OK to be converted to an int" attribute (which would still require musl having to put the attribute in from their side). > Linux itself defines the ioctl syscall to have a second argument of > type unsigned int. My local ioctl(2) manpage says it's unsigned _long_ (not `int`). - NRK