lkml.org 
[lkml]   [2010]   [Sep]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] scripts/checkpatch.pl: Add warnings for static char that could be static const char
    On Thu, Sep 09, 2010 at 03:24:14PM -0400, Mike Frysinger wrote:
    > 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

    Could you elucidate on that comment Mike, perhaps copy those comments
    here.

    -apw
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2010-09-10 11:09    [W:0.021 / U:0.200 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site