summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/hidden
diff options
context:
space:
mode:
authortb <>2023-02-16 08:38:17 +0000
committertb <>2023-02-16 08:38:17 +0000
commit24a27fd0d17d515b00097199de60fa85a76a95df (patch)
tree689defafde66dbfa38a7854af566bd9a05f191b7 /src/lib/libcrypto/hidden
parent3170d87c6599656e7568dca509714cf70723f0d2 (diff)
downloadopenbsd-24a27fd0d17d515b00097199de60fa85a76a95df.tar.gz
openbsd-24a27fd0d17d515b00097199de60fa85a76a95df.tar.bz2
openbsd-24a27fd0d17d515b00097199de60fa85a76a95df.zip
libressl *_namespace.h: adjust *_ALIAS() to require a semicolon
LCRYPTO_ALIAS() and LSSL_ALIAS() contained a trailing semicolon. This does not conform to style(9), breaks editors and ctags and (most importantly) my workflow. Fix this by neutering them with asm("") so that -Wpedantic doesn't complain. There's precedent in libc's namespace.h fix suggested by & ok jsing
Diffstat (limited to 'src/lib/libcrypto/hidden')
-rw-r--r--src/lib/libcrypto/hidden/crypto_namespace.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libcrypto/hidden/crypto_namespace.h b/src/lib/libcrypto/hidden/crypto_namespace.h
index 6ceef26e2d..5bf9b4d4da 100644
--- a/src/lib/libcrypto/hidden/crypto_namespace.h
+++ b/src/lib/libcrypto/hidden/crypto_namespace.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: crypto_namespace.h,v 1.1 2022/11/11 11:25:18 beck Exp $ */ 1/* $OpenBSD: crypto_namespace.h,v 1.2 2023/02/16 08:38:17 tb Exp $ */
2/* 2/*
3 * Copyright (c) 2016 Philip Guenther <guenther@openbsd.org> 3 * Copyright (c) 2016 Philip Guenther <guenther@openbsd.org>
4 * 4 *
@@ -30,7 +30,7 @@
30# define LCRYPTO_USED(x) __attribute__((visibility("hidden"))) \ 30# define LCRYPTO_USED(x) __attribute__((visibility("hidden"))) \
31 typeof(x) x asm("_lcry_"#x) 31 typeof(x) x asm("_lcry_"#x)
32# define LCRYPTO_ALIAS1(pre,x) asm(".global "#pre#x"; "#pre#x" = _lcry_"#x) 32# define LCRYPTO_ALIAS1(pre,x) asm(".global "#pre#x"; "#pre#x" = _lcry_"#x)
33# define LCRYPTO_ALIAS(x) LCRYPTO_ALIAS1(,x); LCRYPTO_ALIAS1(_libre_,x); 33# define LCRYPTO_ALIAS(x) LCRYPTO_ALIAS1(,x); LCRYPTO_ALIAS1(_libre_,x)
34#else 34#else
35# define LCRYPTO_USED(x) typeof(x) x asm("_libre_"#x) 35# define LCRYPTO_USED(x) typeof(x) x asm("_libre_"#x)
36#endif 36#endif
@@ -38,7 +38,7 @@
38# define LCRYPTO_UNUSED(x) 38# define LCRYPTO_UNUSED(x)
39# define LCRYPTO_USED(x) 39# define LCRYPTO_USED(x)
40# define LCRYPTO_ALIAS1(pre,x) 40# define LCRYPTO_ALIAS1(pre,x)
41# define LCRYPTO_ALIAS(x) 41# define LCRYPTO_ALIAS(x) asm("")
42#endif 42#endif
43 43
44#endif /* _LIBCRYPTO_CRYPTO_NAMESPACE_H_ */ 44#endif /* _LIBCRYPTO_CRYPTO_NAMESPACE_H_ */