[kdepimlibs] [Bug 377946] New: Findings from a code review

Steve bugzilla_noreply at kde.org
Wed Mar 22 18:05:09 GMT 2017


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

            Bug ID: 377946
           Summary: Findings from a code review
           Product: kdepimlibs
           Version: unspecified
          Platform: Other
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: kdepim-bugs at kde.org
          Reporter: sgrubb at redhat.com
  Target Milestone: ---

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;

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


More information about the Kdepim-bugs mailing list