D20714: akonadi: fix some clazy warnings
David Faure
noreply at phabricator.kde.org
Sat Apr 27 15:30:02 BST 2019
dfaure added a subscriber: smartins.
dfaure added a comment.
@
INLINE COMMENTS
> dvratil wrote in itemcreatehandler.cpp:402
> @dfaure This looks suspicious. There's a difference in how this is translated in the SQL query: the original version gets translated into `... WHERE gid = ""`, while the new version gets translated into `... WHERE gid = NULL`, which is always `false` (a null never compares to another null). Even if you would change it to `IS NULL` this would still yield different results, since an empty value is not the same as a null value in SQL.
@smartins Interesting. This means this is a clazy false positive. Did I miss a caveat somewhere explaining that the change should only be made if empty vs null makes no difference, unlike here?
I'll revert and add a silence-clazy comment.
REPOSITORY
R165 Akonadi
REVISION DETAIL
https://phabricator.kde.org/D20714
To: dfaure, dvratil, vkrause
Cc: smartins, kde-pim, dvasin, rodsevich, winterz, vkrause, mlaurent, knauss, dvratil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20190427/ae75e6bc/attachment.html>
More information about the kde-pim
mailing list