Opened 6 years ago

Closed 6 years ago

#3451 closed defect (fixed)

cppcheck failure in Postgres backend: unused variable index

Reported by: marcin Owned by: marcin
Priority: medium Milestone: Kea0.9
Component: dhcp Version:
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: Low
Sub-Project: DHCP Feature Depending on Ticket:
Estimated Difficulty: 0 Add Hours to Ticket: 0.5
Total Hours: 2.5 Internal?: no

Description

There is an unused variable in the PostgreSQL lease database backend.

cppcheck -I./src/lib -I./src/bin --enable=all --suppressions  src/cppcheck-suppress.lst --inline-suppr  --quiet --error-exitcode=1  --template '{file}:{line}: check_fail: {message} ({severity},{id})'  src
:: check_fail: Skipping configuration 'DS;__sun' because it seems to be invalid. Use -D if you want to check it. (information,ConfigurationNotChecked)
:: check_fail: Skipping configuration 'IPV6_MTU' because it seems to be invalid. Use -D if you want to check it. (information,ConfigurationNotChecked)
:: check_fail: Skipping configuration 'IPV6_MTU_DISCOVER;IPV6_PMTUDISC_DONT' because it seems to be invalid. Use -D if you want to check it. (information,ConfigurationNotChecked)
:: check_fail: Skipping configuration 'IPV6_USE_MIN_MTU' because it seems to be invalid. Use -D if you want to check it. (information,ConfigurationNotChecked)
:: check_fail: Skipping configuration 'IP_PKTINFO' because it seems to be invalid. Use -D if you want to check it. (information,ConfigurationNotChecked)
:: check_fail: Skipping configuration 'IP_PKTINFO;OS_LINUX' because it seems to be invalid. Use -D if you want to check it. (information,ConfigurationNotChecked)
:: check_fail: Skipping configuration 'SO_BINDTODEVICE' because it seems to be invalid. Use -D if you want to check it. (information,ConfigurationNotChecked)
:: check_fail: Skipping configuration 'IPV6_RECVPKTINFO' because it seems to be invalid. Use -D if you want to check it. (information,ConfigurationNotChecked)
src/lib/dhcpsrv/pgsql_lease_mgr.cc:58: check_fail: struct or union member 'TaggedStatement::index' is never used (style,unusedStructMember)
:: check_fail: Skipping configuration 'EXPECT_DEATH' because it seems to be invalid. Use -D if you want to check it. (information,ConfigurationNotChecked)
:: check_fail: Skipping configuration 'CMSG_LEN' because it seems to be invalid. Use -D if you want to check it. (information,ConfigurationNotChecked)
:: check_fail: Skipping configuration 'CMSG_SPACE' because it seems to be invalid. Use -D if you want to check it. (information,ConfigurationNotChecked)
*** Error code 1

Subtickets

Change History (5)

comment:1 Changed 6 years ago by tomek

  • Milestone changed from Kea-proposed to Kea0.9

comment:2 Changed 6 years ago by marcin

  • Add Hours to Ticket changed from 0 to 2
  • Owner set to UnAssigned
  • Status changed from new to reviewing
  • Total Hours changed from 0 to 2

Removed unused field.

comment:3 Changed 6 years ago by tomek

  • Owner changed from UnAssigned to tomek

comment:4 Changed 6 years ago by tomek

  • Add Hours to Ticket changed from 2 to 0.5
  • Owner changed from tomek to marcin
  • Total Hours changed from 2 to 2.5

Changes are ok, please merge.

comment:5 Changed 6 years ago by marcin

  • Resolution set to fixed
  • Status changed from reviewing to closed

Merged with commit e28f694dfd18efb4022e748de0c4e6f21fcb7e69

Note: See TracTickets for help on using tickets.