I use serial port access with the standard open(), read(), close() functions from unistd.h (Linux).
The whole thing is wrapped with a SerialAccessor class, whose destructor wants to call close(). However, close() is not marked as __THROW, so lint complains that an exception is not caught which is a bad thing in a destructor.
The problem is: what is the correct type to catch since it is not one of the known std-classes?
This does not help, here lint states that "..." is not catched:
#include <unistd.h>
try
{
close (fileHandle);
}
catch(...)
{ }
Anyway, I would prefer to catch a proper class / type instead of using "...".
unistd says:
/* Close the file descriptor FD.
This function is a cancellation point and therefore not marked with
__THROW. */
extern int close (int __fd);