-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 09/25/2011 10:40 AM, Richard Hipp wrote:
> 100% MC/DC has worked very, very well at finding and preventing bugs in
> SQLite.

The one place it doesn't help is when error returns of functions are
ignored.  For example this happens when xCurrentTime of a VFS has an error.
 The call is wrapped in sqlite3OsCurrentTimeInt64 but code calling that
ignores that an error occurred.

  http://www.sqlite.org/src/tktview?name=0b803bff85

You can see how the internal function setDateTimeToCurrent assumes that it
always succeeds.  Error checking would require a conditional for the succeed
and failure cases when MC/DC will then help.

BTW with GCC you can mark functions with the attribute warn_unused_result
which will then cause warnings should the return be ignored.

Roger

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEARECAAYFAk5/kn4ACgkQmOOfHg372QQ9yACgi30Iskv/jbBENr/8N5gp/b3Z
A00AoLZm9Qy+nHKFJLyH8CqzUD8LOYj5
=6S30
-----END PGP SIGNATURE-----
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to