[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Hi,
I am aware that I can disable Codan annotations by removing the appropriate
tick in Windows->Preferences->General->Editors->Text Editors->Annotations. But
most time it is convenient that Codan points me to (potential ?) errors.
I there any way to teach Codan to disregard certain errors ? Or to track down
why Codan is flagging something as wrong, which is actually correct ?
The latest Codan hiccup is flagging the string "F_SETLKW" in the function call
"fcntl(fd, F_SETLKW, &write_lock)" as error (Symbol 'F_SETLKW' could not be
resolved), but hovering the mouse pointer over "fcntl" produces a window
(eventually the man page) that lists F_SETLKW as valid entry for the second
parameter. Apparently, Codan has problems to parse through
"/usr/include/fcntl.h", or doesn't find /usr/include/x86_64-linux-
gnu/bits/fcntl.h. The latter file has the missing definition.
/* Values for the second argument to `fcntl'. */
#define F_DUPFD 0 /* Duplicate file descriptor. */
#define F_GETFD 1 /* Get file descriptor flags. */
#define F_SETFD 2 /* Set file descriptor flags. */
#define F_GETFL 3 /* Get file status flags. */
#define F_SETFL 4 /* Set file status flags. */
#if __WORDSIZE == 64
# define F_GETLK 5 /* Get record locking info. */
# define F_SETLK 6 /* Set record locking info (non-blocking). */
# define F_SETLKW 7 /* Set record locking info (blocking). */
/* Not necessary, we always have 64-bit offsets. */
# define F_GETLK64 5 /* Get record locking info. */
# define F_SETLK64 6 /* Set record locking info (non-blocking). */
# define F_SETLKW64 7 /* Set record locking info (blocking). */
#else
# ifndef __USE_FILE_OFFSET64
# define F_GETLK 5 /* Get record locking info. */
# define F_SETLK 6 /* Set record locking info (non-blocking). */
# define F_SETLKW 7 /* Set record locking info (blocking). */
# else
# define F_GETLK F_GETLK64 /* Get record locking info. */
# define F_SETLK F_SETLK64 /* Set record locking info (non-blocking).*/
# define F_SETLKW F_SETLKW64 /* Set record locking info (blocking). */
# endif
# define F_GETLK64 12 /* Get record locking info. */
# define F_SETLK64 13 /* Set record locking info (non-blocking). */
# define F_SETLKW64 14 /* Set record locking info (blocking). */
#endif
How can I tell Codan to look there ?
--
Mit freundlichen Grüßen / Kind regards
Dr. Christoph Pospiech
High Performance & Parallel Computing
Phone: +49-351 86269826
Mobile: +49-171-765 5871
E-Mail: christoph.pospiech@xxxxxxxxxx
-------------------------------------------------------------------------------------------------------------------------------------------
IBM Deutschland GmbH / Vorsitzender des Aufsichtsrats: Martin Jetter
Geschäftsführung: Martina Koederitz (Vorsitzende), Reinhard Reschke, Dieter
Scholz, Gregor Pillen, Christian Noll, Ivo Koerner
Sitz der Gesellschaft: Ehningen / Registergericht: Amtsgericht Stuttgart, HRB
14562 / WEEE-Reg.-Nr. DE 99369940