• N
    f2fs: fix the compiler warning for uninitialized use of variable · be4124f8
    Namjae Jeon 提交于
    When CONFIG_CC_OPTIMIZE_FOR_SIZE is enabled in the kernel, -Os optimisation
    flag is passed to gcc for compilation, and somehow while trying to optimize
    the code, compiler is might not able to see the initialisation of variable
    ne struct variable inside the get_node_info() function and results into
    following warning:
    
    fs/f2fs/node.c: In function 'get_node_info':
    fs/f2fs/node.c:175:3: warning: 'ne.block_addr' may be used uninitialized in
    this function [-Wuninitialized]
    fs/f2fs/node.c:265:24: note: 'ne.block_addr' was declared here
    fs/f2fs/node.c:176:3: warning: 'ne.ino' may be used uninitialized in this
    function [-Wuninitialized]
    fs/f2fs/node.c:265:24: note: 'ne.ino' was declared here
    fs/f2fs/node.c:177:3: warning: 'ne.version' may be used uninitialized in
    this function [-Wuninitialized]
    fs/f2fs/node.c:265:24: note: 'ne.version' was declared here
    
    Hence, lets initialise the ne struct variable to zero, which will remove
    this warning and also doing this does not seems to making any impact on the
    code behavior.
    Signed-off-by: NNamjae Jeon <namjae.jeon@samsung.com>
    Signed-off-by: NPankaj Kumar <pankaj.km@samsung.com>
    be4124f8
node.c 40.8 KB