From ced8ab50af1429d9ba7651da1b3b78014fd76e79 Mon Sep 17 00:00:00 2001 From: "Luke T. Shumaker" Date: Mon, 11 Nov 2024 10:22:26 -0700 Subject: libmisc: Write my own assert.h --- lib9p/9p.generated.c | 5 +++-- lib9p/idl.gen | 3 ++- lib9p/include/lib9p/9p.generated.h | 2 +- lib9p/include/lib9p/9p.h | 3 ++- lib9p/map.h | 2 +- lib9p/srv.c | 2 +- 6 files changed, 10 insertions(+), 7 deletions(-) (limited to 'lib9p') diff --git a/lib9p/9p.generated.c b/lib9p/9p.generated.c index 6136433..1a00f10 100644 --- a/lib9p/9p.generated.c +++ b/lib9p/9p.generated.c @@ -1,11 +1,12 @@ -/* Generated by `./lib9p/idl.gen lib9p/idl/2002-9P2000.9p lib9p/idl/2005-9P2000.u.9p lib9p/idl/2012-9P2000.e.9p`. DO NOT EDIT! */ +/* Generated by `lib9p/idl.gen lib9p/idl/2002-9P2000.9p lib9p/idl/2005-9P2000.u.9p lib9p/idl/2012-9P2000.e.9p`. DO NOT EDIT! */ -#include #include #include /* for size_t */ #include /* for PRI* macros */ #include /* for memset() */ +#include + #include #include "internal.h" diff --git a/lib9p/idl.gen b/lib9p/idl.gen index ec42cfd..3be1d7e 100755 --- a/lib9p/idl.gen +++ b/lib9p/idl.gen @@ -681,12 +681,13 @@ def gen_c(versions: set[str], typs: list[Type]) -> str: ret = f"""/* Generated by `{' '.join(sys.argv)}`. DO NOT EDIT! */ -#include #include #include /* for size_t */ #include /* for PRI* macros */ #include /* for memset() */ +#include + #include #include "internal.h" diff --git a/lib9p/include/lib9p/9p.generated.h b/lib9p/include/lib9p/9p.generated.h index d5e94d1..feca8c9 100644 --- a/lib9p/include/lib9p/9p.generated.h +++ b/lib9p/include/lib9p/9p.generated.h @@ -1,4 +1,4 @@ -/* Generated by `./lib9p/idl.gen lib9p/idl/2002-9P2000.9p lib9p/idl/2005-9P2000.u.9p lib9p/idl/2012-9P2000.e.9p`. DO NOT EDIT! */ +/* Generated by `lib9p/idl.gen lib9p/idl/2002-9P2000.9p lib9p/idl/2005-9P2000.u.9p lib9p/idl/2012-9P2000.e.9p`. DO NOT EDIT! */ #ifndef _LIB9P_9P_H_ #error Do not include directly; include instead diff --git a/lib9p/include/lib9p/9p.h b/lib9p/include/lib9p/9p.h index 171ad3b..9d22354 100644 --- a/lib9p/include/lib9p/9p.h +++ b/lib9p/include/lib9p/9p.h @@ -7,10 +7,11 @@ #ifndef _LIB9P_9P_H_ #define _LIB9P_9P_H_ -#include #include #include /* for ssize_t */ +#include + #include /* configuration **************************************************************/ diff --git a/lib9p/map.h b/lib9p/map.h index c816bde..f42bb2c 100644 --- a/lib9p/map.h +++ b/lib9p/map.h @@ -84,7 +84,7 @@ static VAL_T *MAP_METHOD(NAME,store)(struct NAME *m, KEY_T k, VAL_T v) { m->items[i].val = v; return &(m->items[i].val); } - __builtin_unreachable(); + assert_notreached("should have returned from inside for() loop"); } /** diff --git a/lib9p/srv.c b/lib9p/srv.c index 9192794..e4212e5 100644 --- a/lib9p/srv.c +++ b/lib9p/srv.c @@ -4,7 +4,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ -#include #include #include /* for PRI* */ #include /* for fprintf(), stderr */ @@ -14,6 +13,7 @@ #include #include #include +#include #include #define IMPLEMENTATION_FOR_LIB9P_SRV_H YES -- cgit v1.2.3-2-g168b