https://bugs.kde.org/show_bug.cgi?id=377897

            Bug ID: 377897
           Summary: Findings from code review
           Product: Akonadi
           Version: unspecified
          Platform: Other
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: server
          Assignee: kdepim-bugs@kde.org
          Reporter: sgr...@redhat.com
  Target Milestone: ---

Leaked FD:
akonadi-16.12.2/src/rds/bridgeconnection.cpp:96: open_fn: Returning handle
opened by "socket".
akonadi-16.12.2/src/rds/bridgeconnection.cpp:96: var_assign: Assigning: "fd" =
handle returned from "socket(1, SOCK_STREAM, 0)".
akonadi-16.12.2/src/rds/bridgeconnection.cpp:103: noescape: Resource "fd" is
not freed or pointed-to in "connect".
akonadi-16.12.2/src/rds/bridgeconnection.cpp:107: leaked_handle: Handle
variable "fd" going out of scope leaks the handle.

Missing return statements:
akonadi-16.12.2/src/server/handler.cpp:216: unterminated_case: The case for
value "Akonadi::Protocol::Command::SubscriptionChangeNotification" is not
terminated by a 'break' statement.
akonadi-16.12.2/src/server/handler.cpp:219: fallthrough: The above case falls
through to this one.
akonadi-16.12.2/src/server/handler.cpp:222: fallthrough: The above case falls
through to this one.

Identical branches:
akonadi-16.12.2/x86_64-redhat-linux-gnu/src/agentbase/moc_preprocessorbase.cpp:87:
implicit_else: The code from the above if-then branch is identical to the code
after the if statement.
akonadi-16.12.2/x86_64-redhat-linux-gnu/src/agentbase/moc_preprocessorbase.cpp:85:
identical_branches: The same code is executed when the condition "_id < 0" is
true or false, because the code in the if-then branch and after the if
statement is identical.

The identical branches is in other files, too. You can probably grep on it.

Missing Break:
akonadi-16.12.2/src/core/changerecorder_p.cpp:95: unterminated_case: The case
for value "Akonadi::ChangeRecorderPrivate::Collection" is not terminated by a
'break' statement.
akonadi-16.12.2/src/core/changerecorder_p.cpp:97: fallthrough: The above case
falls through to this one.

Double return statements, is the first one supposed to be there?:
akonadi-16.12.2/src/private/protocol.cpp:8019: unreachable: This code cannot be
reached: "return stream;".

Another double return:
akonadi-16.12.2/src/private/protocol.cpp:8025: unreachable: This code cannot be
reached: "return stream;".

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to