From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756378AbZEEABR (ORCPT ); Mon, 4 May 2009 20:01:17 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756406AbZEEABD (ORCPT ); Mon, 4 May 2009 20:01:03 -0400 Received: from yw-out-2324.google.com ([74.125.46.28]:18190 "EHLO yw-out-2324.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754587AbZEEABB (ORCPT ); Mon, 4 May 2009 20:01:01 -0400 MIME-Version: 1.0 Date: Mon, 4 May 2009 17:00:59 -0700 Message-ID: Subject: const-correctness warnings from gcc -Wwrite-strings? From: Chris Peterson To: linux-kernel@vger.kernel.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I am preparing a patch that would fix some const-correctness warnings when compiling the kernel with gcc -Wwrite-strings. I am not (yet?) proposing that the kernel Makefile should use -Wwrite-strings. String constants are not writable, but without -Wwrite-strings, gcc pretends string constants have type non-const char[] to support lazy legacy code. :) Are these fixes of any interest? The only controversy I see is that some of the changes affect the function signatures of some ops structures' function pointers. chris