Thread

  1. Re: Further news on Clang - spurious warnings

    Peter Geoghegan <peter@2ndquadrant.com> — 2011-08-05T18:52:32Z

    Now, apart from the Flex warning, there are just 3 warnings left. They
    all look like this:
    
    repl_gram.y:106:30: warning: implicit conversion from enumeration type
    'enum ReplNodeTag' to different enumeration type 'NodeTag' (aka 'enum
    NodeTag') [-Wconversion]
                                            (yyval.node) = (Node *)
    makeNode(IdentifySystemCmd);
    
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~
    ../../../src/include/nodes/nodes.h:475:64: note: expanded from:
    #define makeNode(_type_)                ((_type_ *)
    newNode(sizeof(_type_),T_##_type_))
                                                                                 ^
    <scratch space>:180:1: note: expanded from:
    T_IdentifySystemCmd
    ^
    ../../../src/include/nodes/nodes.h:452:19: note: expanded from:
            _result->type = (tag); \
                          ~  ^~~
    Attached patch fixes all 3 warnings with an explicit cast, so the
    number of warnings with Clang is the same number as GCC 4.5 - 1. On
    GCC 4.6, there are still quite a few -Wunused-but-set-variable
    warnings left despite an effort to eradicate them. Perhaps I should
    look into that next.
    
    -- 
    Peter Geoghegan       http://www.2ndQuadrant.com/
    PostgreSQL Development, 24x7 Support, Training and Services