Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:23
erlang
0419-erl_interface-Silence-CodeChecker-in-ei_fo...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0419-erl_interface-Silence-CodeChecker-in-ei_format.c.patch of Package erlang
From c20b29fe5065b8b0ca6abcf977bea0f0ba452651 Mon Sep 17 00:00:00 2001 From: Sverker Eriksson <sverker@erlang.org> Date: Tue, 9 Feb 2021 12:47:04 +0100 Subject: [PATCH 19/34] erl_interface: Silence CodeChecker in ei_format.c --- lib/erl_interface/src/misc/ei_format.c | 3 +++ lib/erl_interface/src/misc/eidef.h | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/lib/erl_interface/src/misc/ei_format.c b/lib/erl_interface/src/misc/ei_format.c index 695c3404f7..df6be933db 100644 --- a/lib/erl_interface/src/misc/ei_format.c +++ b/lib/erl_interface/src/misc/ei_format.c @@ -234,6 +234,9 @@ static int pquotedatom(const char** fmt, ei_x_buff* x) static int pformat(const char** fmt, union arg** args, ei_x_buff* x) { int res = 0; + + ASSERT(args && *args); + ++(*fmt); /* skip tilde */ switch (*(*fmt)++) { case 'a': diff --git a/lib/erl_interface/src/misc/eidef.h b/lib/erl_interface/src/misc/eidef.h index e6039cfca8..cbd68084bc 100644 --- a/lib/erl_interface/src/misc/eidef.h +++ b/lib/erl_interface/src/misc/eidef.h @@ -65,4 +65,10 @@ typedef signed char int8; typedef signed short int16; typedef signed int int32; +#ifdef DEBUG +# define ASSERT(Cnd) ((void) ((Cnd) ? 1 : abort())) +#else +# define ASSERT(Cnd) +#endif + #endif /* _EIDEF_H */ -- 2.26.2
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor