Re: [PATCH] scripts/checkpatch.pl: Add warnings for static char thatcould be static const char

From: Mike Frysinger
Date: Thu Sep 09 2010 - 15:24:42 EST


On Thu, Sep 9, 2010 at 15:21, Joe Perches wrote:
> Add warnings for possible missing const uses of
> Â Â Â Âstatic char foo[] = "bar"
> Â Âthat could be
> Â Â Â Âstatic const char foo[] = "bar"
> and
> Â Â Â Âstatic const char *foo[] = {"bar", "baz"}
> Â Âthat could be
> Â Â Â Âstatic const char * const foo[] = {"bar", "baz"}

guess you missed my last e-mail about not bothering checking the
static or the contents :)

> + if ($line =~ /\bconst\s+char\s*\*\s*(\w+)\s*\[\s*\]/) {
-mike
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/