From 70645d94d392f90ffc5260f753f8df07827654de Mon Sep 17 00:00:00 2001 From: Iustin Pop Date: Mon, 14 May 2012 23:53:40 +0200 Subject: [PATCH] Mark convertObj as setting the exception on errors This eliminates lots of clutter from the cpychecker output, yay! --- xattr.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/xattr.c b/xattr.c index 1470deb..c80314c 100644 --- a/xattr.c +++ b/xattr.c @@ -63,6 +63,19 @@ static void free_tgt(target_t *tgt) { } } +/* Used for cpychecker: */ +/* The checker automatically defines this preprocessor name when creating + the custom attribute: */ +#if defined(WITH_CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION_ATTRIBUTE) + #define CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION \ +__attribute__((cpychecker_negative_result_sets_exception)) + #else + #define CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION + #endif + +static int convertObj(PyObject *myobj, target_t *tgt, int nofollow) + CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION; + /** Converts from a string, file or int argument to what we need. * * Returns -1 on failure, 0 on success. -- 2.39.5