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
diff --git a/src/include/nodes/nodes.h b/src/include/nodes/nodes.h index d8bc6b8..5a87f92 100644 --- a/src/include/nodes/nodes.h +++ b/src/include/nodes/nodes.h @@ -472,7 +472,7 @@ extern PGDLLIMPORT Node *newNodeMacroHolder; #endif /* __GNUC__ */ -#define makeNode(_type_) ((_type_ *) newNode(sizeof(_type_),T_##_type_)) +#define makeNode(_type_) ((_type_ *) newNode(sizeof(_type_), (NodeTag) T_##_type_)) #define NodeSetTag(nodeptr,t) (((Node*)(nodeptr))->type = (t)) #define IsA(nodeptr,_type_) (nodeTag(nodeptr) == T_##_type_)
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers