[MDEV-13955] mariadb-10.2.9/sql/log_event.cc:7671: possible wrong operator ? Created: 2017-09-29  Updated: 2023-01-16  Resolved: 2023-01-16

Status: Closed
Project: MariaDB Server
Component/s: Compiling
Affects Version/s: 10.2.9
Fix Version/s: 10.2.10, 10.3.2

Type: Bug Priority: Minor
Reporter: David Binderman Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: cppcheck


 Description   

mariadb-10.2.9/sql/log_event.cc:7671]: (style) Boolean result is used in bitwise operation. Clarify expression with parentheses.

Source code is

  if (!print_event_info->short_form & !is_flashback)

Maybe better code

  if (!print_event_info->short_form && !is_flashback)



 Comments   
Comment by Vladislav Vaintroub [ 2017-09-29 ]

If the number of the compile warnings like that is high, maybe you just create one bug report, and describe the compiler you used?

Comment by Sergei Golubchik [ 2017-09-29 ]

Judging from the warning text it seems to be cppcheck.

Comment by Daniel Black [ 2023-01-16 ]

fixed with a62ebf2590800d70c19f1063e6a506969dd2f7a0

Generated at Thu Feb 08 08:09:42 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.