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
commitb1fbdd21532891fac5b0f128e57331894bd69d84 (patch)
tree689defafde66dbfa38a7854af566bd9a05f191b7 /src/lib/libcrypto/hidden
parentee0f647faa09f91cb79b628dcb818adaa381af90 (diff)
downloadopenbsd-b1fbdd21532891fac5b0f128e57331894bd69d84.tar.gz
openbsd-b1fbdd21532891fac5b0f128e57331894bd69d84.tar.bz2
openbsd-b1fbdd21532891fac5b0f128e57331894bd69d84.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_ */