Bug 377946 - Findings from a code review
Summary: Findings from a code review
Status: RESOLVED INTENTIONAL
Alias: None
Product: kdepimlibs
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-22 18:05 UTC by Steve
Modified: 2017-03-22 20:20 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Steve 2017-03-22 18:05:09 UTC
Missing break/return:
kdepimlibs-4.14.10/akonadi/calendar/calendarmodel.cpp:115: unterminated_case: The case for value "Qt::DisplayRole" is not terminated by a 'break' statement.
kdepimlibs-4.14.10/akonadi/calendar/calendarmodel.cpp:153: fallthrough: The above case falls through to this one.

Confused code:
kdepimlibs-4.14.10/akonadi/entitylistview.cpp:193: cond_const: Condition "menuCanceled", taking false branch. Now the value of "menuCanceled" is equal to 0.
kdepimlibs-4.14.10/akonadi/entitylistview.cpp:195: const: At condition "menuCanceled", the value of "menuCanceled" must be equal to 0.
kdepimlibs-4.14.10/akonadi/entitylistview.cpp:195: dead_error_condition: The condition "menuCanceled" cannot be true.
kdepimlibs-4.14.10/akonadi/entitylistview.cpp:196: dead_error_line: Execution cannot reach this statement: "return;".

Object Passed by Value instead of Reference:
kdepimlibs-4.14.10/kcal/icalformat_p.cpp:2548: pass_by_value: Passing parameter r of type "icalrecurrencetype" (size 2904 bytes) by value.

Unterminated string possible:
kdepimlibs-4.14.10/kcalcore/versit/vobject.c:1238: buffer_size_warning: strncpy does not terminate strings if they are equal to or larger than the size passed, To be safe it needs to be manually terminated: buf1[255] = 0;
Comment 1 Laurent Montel 2017-03-22 20:20:24 UTC
4.4.10 code is closed.
Last version is 5.4.3
Regards