]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
[XFS] fix spurious gcc warnings
authorChristoph Hellwig <hch@infradead.org>
Fri, 28 Nov 2008 03:23:33 +0000 (14:23 +1100)
committerNiv Sardi <xaiki@sgi.com>
Mon, 1 Dec 2008 00:07:37 +0000 (11:07 +1100)
Some recent gcc warnings don't like passing string variables to
printf-like functions without using at least a "%s" format string.
Change the two occurances of that in xfs to please gcc.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
Signed-off-by: Niv Sardi <xaiki@sgi.com>
fs/xfs/linux-2.6/xfs_stats.c
fs/xfs/linux-2.6/xfs_super.c

index 64f4ec90b8b27c5babbdec3545f1abd8043c0faf..c3526d445f6a281c095371d4f5d7bf83658f63d5 100644 (file)
@@ -61,7 +61,7 @@ xfs_read_xfsstats(
 
        /* Loop over all stats groups */
        for (i=j=len = 0; i < ARRAY_SIZE(xstats); i++) {
-               len += sprintf(buffer + len, xstats[i].desc);
+               len += sprintf(buffer + len, "%s", xstats[i].desc);
                /* inner loop does each group */
                while (j < xstats[i].endpoint) {
                        val = 0;
index c3d004bc4621c7bf0b66580d5955386294879a79..cc5e07e3e7a1fed4ad49c055ea0d63cd18789efa 100644 (file)
@@ -1848,10 +1848,9 @@ STATIC int __init
 init_xfs_fs(void)
 {
        int                     error;
-       static char             message[] __initdata = KERN_INFO \
-               XFS_VERSION_STRING " with " XFS_BUILD_OPTIONS " enabled\n";
 
-       printk(message);
+       printk(KERN_INFO XFS_VERSION_STRING " with "
+                        XFS_BUILD_OPTIONS " enabled\n");
 
        ktrace_init(64);
        vn_init();