[pgpool-hackers: 1109] Re: New Defects reported by Coverity Scan for pgpool-II
Yugo Nagata
nagata at sraoss.co.jp
Thu Oct 15 14:12:41 JST 2015
On Thu, 15 Oct 2015 12:12:01 +0900
Yugo Nagata <nagata at sraoss.co.jp> wrote:
> On Thu, 15 Oct 2015 09:24:48 +0900 (JST)
> Tatsuo Ishii <ishii at postgresql.org> wrote:
>
> > Yugo,
> >
> > Here is the latest coverity scan repport for the master branch. I
> > believe this is related to the recent parser update commit.
>
> OK. I'll fix this.
Done.
http://git.postgresql.org/gitweb/?p=pgpool2.git;a=commitdiff;h=aadb37eaa183939c5942e42fea02e426885e595c
http://git.postgresql.org/gitweb/?p=pgpool2.git;a=commit;h=5ee53d5fe9c32bd76e8a6f0f4b9a794f38aa1ed1
>
> >
> > Best regards,
> > --
> > Tatsuo Ishii
> > SRA OSS, Inc. Japan
> > English: http://www.sraoss.co.jp/index_en.php
> > Japanese:http://www.sraoss.co.jp
> >
> > > Hi,
> > >
> > > Please find the latest report on new defect(s) introduced to pgpool-II found with Coverity Scan.
> > >
> > > 2 new defect(s) introduced to pgpool-II found with Coverity Scan.
> > >
> > >
> > > New defect(s) Reported-by: Coverity Scan
> > > Showing 2 of 2 defect(s)
> > >
> > >
> > > ** CID 1327389: (CONSTANT_EXPRESSION_RESULT)
> > > /src/parser/outfuncs.c: 2410 in _outVacuumStmt()
> > > /src/parser/outfuncs.c: 2422 in _outVacuumStmt()
> > > /src/parser/outfuncs.c: 2416 in _outVacuumStmt()
> > > /src/parser/outfuncs.c: 2413 in _outVacuumStmt()
> > > /src/parser/outfuncs.c: 2419 in _outVacuumStmt()
> > >
> > >
> > > ________________________________________________________________________________________________________
> > > *** CID 1327389: (CONSTANT_EXPRESSION_RESULT)
> > > /src/parser/outfuncs.c: 2410 in _outVacuumStmt()
> > > 2404 }
> > > 2405
> > > 2406 static void _outVacuumStmt(String *str, VacuumStmt *node)
> > > 2407 {
> > > 2408 if (node->options | VACOPT_VACUUM)
> > > 2409 string_append_char(str, "VACUUM ");
> > >>>> CID 1327389: (CONSTANT_EXPRESSION_RESULT)
> > >>>> "node->options | VACOPT_ANALYZE" is always 1/true regardless of the values of its operand. This occurs as the logical operand of if.
> > > 2410 else if (node->options | VACOPT_ANALYZE)
> > > 2411 string_append_char(str, "ANALYZE ");
> > > 2412
> > > 2413 if (node->options | VACOPT_FULL)
> > > 2414 string_append_char(str, "FULL ");
> > > 2415
> > > /src/parser/outfuncs.c: 2422 in _outVacuumStmt()
> > > 2416 if (node->options | VACOPT_FREEZE)
> > > 2417 string_append_char(str, "FREEZE ");
> > > 2418
> > > 2419 if (node->options | VACOPT_VERBOSE)
> > > 2420 string_append_char(str, "VERBOSE ");
> > > 2421
> > >>>> CID 1327389: (CONSTANT_EXPRESSION_RESULT)
> > >>>> "node->options | VACOPT_ANALYZE" is always 1/true regardless of the values of its operand. This occurs as the logical second operand of '&&'.
> > > 2422 if (node->options | VACOPT_VACUUM && node->options | VACOPT_ANALYZE)
> > > 2423 string_append_char(str, "ANALYZE ");
> > > 2424
> > > 2425 _outNode(str, node->relation);
> > > 2426 if (node->va_cols)
> > > 2427 {
> > > /src/parser/outfuncs.c: 2416 in _outVacuumStmt()
> > > 2410 else if (node->options | VACOPT_ANALYZE)
> > > 2411 string_append_char(str, "ANALYZE ");
> > > 2412
> > > 2413 if (node->options | VACOPT_FULL)
> > > 2414 string_append_char(str, "FULL ");
> > > 2415
> > >>>> CID 1327389: (CONSTANT_EXPRESSION_RESULT)
> > >>>> "node->options | VACOPT_FREEZE" is always 1/true regardless of the values of its operand. This occurs as the logical operand of if.
> > > 2416 if (node->options | VACOPT_FREEZE)
> > > 2417 string_append_char(str, "FREEZE ");
> > > 2418
> > > 2419 if (node->options | VACOPT_VERBOSE)
> > > 2420 string_append_char(str, "VERBOSE ");
> > > 2421
> > > /src/parser/outfuncs.c: 2413 in _outVacuumStmt()
> > > 2407 {
> > > 2408 if (node->options | VACOPT_VACUUM)
> > > 2409 string_append_char(str, "VACUUM ");
> > > 2410 else if (node->options | VACOPT_ANALYZE)
> > > 2411 string_append_char(str, "ANALYZE ");
> > > 2412
> > >>>> CID 1327389: (CONSTANT_EXPRESSION_RESULT)
> > >>>> "node->options | VACOPT_FULL" is always 1/true regardless of the values of its operand. This occurs as the logical operand of if.
> > > 2413 if (node->options | VACOPT_FULL)
> > > 2414 string_append_char(str, "FULL ");
> > > 2415
> > > 2416 if (node->options | VACOPT_FREEZE)
> > > 2417 string_append_char(str, "FREEZE ");
> > > 2418
> > > /src/parser/outfuncs.c: 2419 in _outVacuumStmt()
> > > 2413 if (node->options | VACOPT_FULL)
> > > 2414 string_append_char(str, "FULL ");
> > > 2415
> > > 2416 if (node->options | VACOPT_FREEZE)
> > > 2417 string_append_char(str, "FREEZE ");
> > > 2418
> > >>>> CID 1327389: (CONSTANT_EXPRESSION_RESULT)
> > >>>> "node->options | VACOPT_VERBOSE" is always 1/true regardless of the values of its operand. This occurs as the logical operand of if.
> > > 2419 if (node->options | VACOPT_VERBOSE)
> > > 2420 string_append_char(str, "VERBOSE ");
> > > 2421
> > > 2422 if (node->options | VACOPT_VACUUM && node->options | VACOPT_ANALYZE)
> > > 2423 string_append_char(str, "ANALYZE ");
> > > 2424
> > >
> > > ** CID 1327388: Control flow issues (UNREACHABLE)
> > > /src/rewrite/pool_timestamp.c: 1150 in raw_expression_tree_walker()
> > >
> > >
> > > ________________________________________________________________________________________________________
> > > *** CID 1327388: Control flow issues (UNREACHABLE)
> > > /src/rewrite/pool_timestamp.c: 1150 in raw_expression_tree_walker()
> > > 1144 if (walker((Node *) lfirst(temp), context))
> > > 1145 return true;
> > > 1146 }
> > > 1147 break;
> > > 1148 case T_InsertStmt:
> > > 1149 break;
> > >>>> CID 1327388: Control flow issues (UNREACHABLE)
> > >>>> This code cannot be reached: "{
> > > InsertStmt *stmt = (Ins...".
> > > 1150 {
> > > 1151 InsertStmt *stmt = (InsertStmt *) node;
> > > 1152
> > > 1153 if (walker(stmt->relation, context))
> > > 1154 return true;
> > > 1155 if (walker(stmt->cols, context))
> > >
> > >
> > > ________________________________________________________________________________________________________
> > > To view the defects in Coverity Scan visit, https://scan.coverity.com/projects/pgpool-ii?tab=overview
> > >
> > > To manage Coverity Scan email notifications for "ishii at sraoss.co.jp", click https://scan.coverity.com/subscriptions/edit?email=ishii%40sraoss.co.jp&token=5dff6b0168f7e9076d0b3f1acb3cf01b
> > >
> > _______________________________________________
> > pgpool-hackers mailing list
> > pgpool-hackers at pgpool.net
> > http://www.pgpool.net/mailman/listinfo/pgpool-hackers
>
>
> --
> Yugo Nagata <nagata at sraoss.co.jp>
> _______________________________________________
> pgpool-hackers mailing list
> pgpool-hackers at pgpool.net
> http://www.pgpool.net/mailman/listinfo/pgpool-hackers
--
Yugo Nagata <nagata at sraoss.co.jp>
More information about the pgpool-hackers
mailing list