Check return codes everywhere
Status: Beta
Brought to you by:
kichiki
Some checks for return codes are missing.
Examples:
Would you like to add more error handling for return values from "malloc" in functions like "HC_complex_phase_vocoder" and "pv_loose_lock"?
http://waon.cvs.sourceforge.net/waon/waon/hc.c?revision=1.5&view=markup
http://waon.cvs.sourceforge.net/waon/waon/pv-loose-lock.c?revision=1.6&view=markup
http://www.gtk.org/api/2.6/glib/glib-Memory-Allocation.html
Logged In: YES
user_id=1602015
Originator: NO
Hi Markus, Thanks for your post. Now it is done. See CVS.
Logged In: YES
user_id=572001
Originator: YES
Would you like to fix more unchecked function calls?
- close
- fprintf
- read
http://waon.cvs.sourceforge.net/waon/waon/midi.c?revision=1.4&view=markup
How do you think about to detect every error situation as early as possible?
Logged In: NO
Hi Markus, Can you be more specific? Theoretically it is better checking everything whenever available. Practically I sometime skip something, 'cause I want to spend more time on others like to add functions and to improve the quailty. If you met any real BUG situation, give me the situation. Thanks. Kengo
Logged In: YES
user_id=572001
Originator: YES
1. Does any unchecked write call affect code quality?
2. Can the tool "http://splint.org/" help?
3. Would you like to use exception handling?
http://www.dietmar-kuehl.de/mirror/c++-faq/exceptions.html#faq-17.1