Commit b93f76f9 authored by Philip Chimento's avatar Philip Chimento 🚮

test: Mark that g_assertion_message() does not normally return

g_assertion_message() can return if nonfatal assertions are enabled, but
for the purposes of static analysis, we want to consider it non-
returning.

See: glib!1553
parent 40f6cad4
Pipeline #193814 passed with stages
in 3 minutes and 25 seconds
......@@ -24,6 +24,12 @@ namespace mozilla {
union Utf8Unit;
}
// COMPAT: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1553
#ifdef __clang_analyzer__
void g_assertion_message(const char*, const char*, int, const char*,
const char*) __attribute__((analyzer_noreturn));
#endif
#define assert_match(str, pattern) \
G_STMT_START { \
const char *__s1 = (str), *__s2 = (pattern); \
......
......@@ -33,6 +33,12 @@
#include "test/gjs-test-common.h"
// COMPAT: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1553
#ifdef __clang_analyzer__
void g_assertion_message(const char*, const char*, int, const char*,
const char*) __attribute__((analyzer_noreturn));
#endif
char* gjs_test_get_exception_message(JSContext* cx) {
if (!JS_IsExceptionPending(cx))
return nullptr;
......
......@@ -36,6 +36,12 @@
#include "gjs/coverage.h"
#include "gjs/jsapi-util.h"
// COMPAT: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1553
#ifdef __clang_analyzer__
void g_assertion_message(const char*, const char*, int, const char*,
const char*) __attribute__((analyzer_noreturn));
#endif
typedef struct _GjsCoverageFixture {
GjsContext *context;
GjsCoverage *coverage;
......
......@@ -12,6 +12,12 @@
#include "gjs/jsapi-util-root.h"
#include "test/gjs-test-utils.h"
// COMPAT: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1553
#ifdef __clang_analyzer__
void g_assertion_message(const char*, const char*, int, const char*,
const char*) __attribute__((analyzer_noreturn));
#endif
static GMutex gc_lock;
static GCond gc_finished;
static volatile int gc_counter;
......
......@@ -46,6 +46,12 @@
#include "test/gjs-test-utils.h"
#include "util/misc.h"
// COMPAT: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1553
#ifdef __clang_analyzer__
void g_assertion_message(const char*, const char*, int, const char*,
const char*) __attribute__((analyzer_noreturn));
#endif
#define VALID_UTF8_STRING "\303\211\303\226 foobar \343\203\237"
static void
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment