Bug 157168

Summary: Check return codes everywhere
Product: [Applications] kmail Reporter: Markus Elfring <Markus.Elfring>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED INTENTIONAL    
Severity: normal CC: finex
Priority: NOR    
Version: 1.9.6   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:

Description Markus Elfring 2008-02-04 22:15:43 UTC
Version:           1.9.6 (using KDE 3.5.8)
Installed from:    SuSE RPMs
OS:                Linux

Some checks for return codes are missing.

Examples:
Would you like to add more error handling for return values from "fread" like in the function "KMMsgDict::openFolderIds" and from "fseek" in the function "KMMsgDict::writeFolderIds"?
(Source file "kmmsgdict.cpp")
Comment 1 Thomas McGuire 2008-02-05 14:39:08 UTC
This bugtracker is not for implementation details of the code, it is about user-visible bugs.
Don't write bug reports for implementation details.

I understand that not checking return values could, under very rare circumstances, lead to a bug.

This is unlikely, and no one has experienced this so far.

Furthermore, the whole message dict thing will be replaced by Akonadi.
Comment 2 Markus Elfring 2008-02-05 15:54:59 UTC
Ignored error codes might become noticeable by a user if related system resources were exhausted.
I suggest to avoid unchecked function calls.
Would you like to detect every error situation as early as possible?

Will the software "Akonadi" be better in this design aspect?
Comment 3 Thomas McGuire 2008-02-05 16:13:34 UTC
I know what the consequences are.
WONTFIX means that the bug will not be fixed by us. Patches are still welcome. Please do not reopen.

>Will the software "Akonadi" be better in this design aspect? 
I don't know.
Comment 4 Markus Elfring 2008-02-05 17:52:37 UTC
My bug report might affect fundamental design aspects in your
software. I imagine that a consensus will be needed for proper fixes.