summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSean McBride <sean@rogue-research.com>2021-03-12 14:56:09 (GMT)
committerGitHub <noreply@github.com>2021-03-12 14:56:09 (GMT)
commit24c83cf73ebb80a58ce92463dac02713d3a4dbf8 (patch)
tree8b595b08c4c7200af144923ecda176aa43dd0959
parent748da20bbc42aa119305ee84f863361816e1517e (diff)
downloadhdf5-24c83cf73ebb80a58ce92463dac02713d3a4dbf8.zip
hdf5-24c83cf73ebb80a58ce92463dac02713d3a4dbf8.tar.gz
hdf5-24c83cf73ebb80a58ce92463dac02713d3a4dbf8.tar.bz2
Removed workarounds for pre-standard inline keyword (#423)
Fixes -Wreserved-identifier warnings due to multiple underscores in H5_HAVE___INLINE.
-rw-r--r--src/H5Oshared.h16
-rw-r--r--src/H5VMprivate.h24
-rw-r--r--src/H5private.h17
3 files changed, 20 insertions, 37 deletions
diff --git a/src/H5Oshared.h b/src/H5Oshared.h
index 0e774cf..f164db3 100644
--- a/src/H5Oshared.h
+++ b/src/H5Oshared.h
@@ -44,7 +44,7 @@
*
*-------------------------------------------------------------------------
*/
-static H5_INLINE void *
+static inline void *
H5O_SHARED_DECODE(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags, unsigned *ioflags, size_t p_size,
const uint8_t *p)
{
@@ -103,7 +103,7 @@ done:
*
*-------------------------------------------------------------------------
*/
-static H5_INLINE herr_t
+static inline herr_t
H5O_SHARED_ENCODE(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg)
{
const H5O_shared_t *sh_mesg =
@@ -158,7 +158,7 @@ done:
*
*-------------------------------------------------------------------------
*/
-static H5_INLINE size_t
+static inline size_t
H5O_SHARED_SIZE(const H5F_t *f, hbool_t disable_shared, const void *_mesg)
{
const H5O_shared_t *sh_mesg =
@@ -211,7 +211,7 @@ done:
*
*-------------------------------------------------------------------------
*/
-static H5_INLINE herr_t
+static inline herr_t
H5O_SHARED_DELETE(H5F_t *f, H5O_t *open_oh, void *_mesg)
{
H5O_shared_t *sh_mesg = (H5O_shared_t *)_mesg; /* Pointer to shared message portion of actual message */
@@ -262,7 +262,7 @@ done:
*
*-------------------------------------------------------------------------
*/
-static H5_INLINE herr_t
+static inline herr_t
H5O_SHARED_LINK(H5F_t *f, H5O_t *open_oh, void *_mesg)
{
H5O_shared_t *sh_mesg = (H5O_shared_t *)_mesg; /* Pointer to shared message portion of actual message */
@@ -312,7 +312,7 @@ done:
*
*-------------------------------------------------------------------------
*/
-static H5_INLINE void *
+static inline void *
H5O_SHARED_COPY_FILE(H5F_t *file_src, void *_native_src, H5F_t *file_dst, hbool_t *recompute_size,
unsigned *mesg_flags, H5O_copy_t *cpy_info, void *udata)
{
@@ -375,7 +375,7 @@ done:
*
*-------------------------------------------------------------------------
*/
-static H5_INLINE herr_t
+static inline herr_t
H5O_SHARED_POST_COPY_FILE(const H5O_loc_t H5_ATTR_NDEBUG_UNUSED *oloc_src, const void *mesg_src,
H5O_loc_t *oloc_dst, void *mesg_dst, unsigned *mesg_flags, H5O_copy_t *cpy_info)
{
@@ -445,7 +445,7 @@ done:
*
*-------------------------------------------------------------------------
*/
-static H5_INLINE herr_t
+static inline herr_t
H5O_SHARED_DEBUG(H5F_t *f, const void *_mesg, FILE *stream, int indent, int fwidth)
{
const H5O_shared_t *sh_mesg =
diff --git a/src/H5VMprivate.h b/src/H5VMprivate.h
index e24ce83..2fea2fc 100644
--- a/src/H5VMprivate.h
+++ b/src/H5VMprivate.h
@@ -143,7 +143,7 @@ H5_DLL ssize_t H5VM_memcpyvv(void *_dst, size_t dst_max_nseq, size_t *dst_curr_s
*
*-------------------------------------------------------------------------
*/
-static H5_INLINE hsize_t H5_ATTR_UNUSED
+static inline hsize_t H5_ATTR_UNUSED
H5VM_vector_reduce_product(unsigned n, const hsize_t *v)
{
hsize_t ret_value = 1;
@@ -179,7 +179,7 @@ done:
*
*-------------------------------------------------------------------------
*/
-static H5_INLINE htri_t H5_ATTR_UNUSED
+static inline htri_t H5_ATTR_UNUSED
H5VM_vector_zerop_u(int n, const hsize_t *v)
{
htri_t ret_value = TRUE; /* Return value */
@@ -216,7 +216,7 @@ done:
*
*-------------------------------------------------------------------------
*/
-static H5_INLINE htri_t H5_ATTR_UNUSED
+static inline htri_t H5_ATTR_UNUSED
H5VM_vector_zerop_s(int n, const hssize_t *v)
{
htri_t ret_value = TRUE; /* Return value */
@@ -255,7 +255,7 @@ done:
*
*-------------------------------------------------------------------------
*/
-static H5_INLINE int H5_ATTR_UNUSED
+static inline int H5_ATTR_UNUSED
H5VM_vector_cmp_u(unsigned n, const hsize_t *v1, const hsize_t *v2)
{
int ret_value = 0; /* Return value */
@@ -303,7 +303,7 @@ done:
*
*-------------------------------------------------------------------------
*/
-static H5_INLINE int H5_ATTR_UNUSED
+static inline int H5_ATTR_UNUSED
H5VM_vector_cmp_s(unsigned n, const hssize_t *v1, const hssize_t *v2)
{
int ret_value = 0; /* Return value */
@@ -346,7 +346,7 @@ done:
*
*-------------------------------------------------------------------------
*/
-static H5_INLINE void H5_ATTR_UNUSED
+static inline void H5_ATTR_UNUSED
H5VM_vector_inc(int n, hsize_t *v1, const hsize_t *v2)
{
while (n--)
@@ -390,7 +390,7 @@ static const unsigned char LogTable256[] = {
*
*-------------------------------------------------------------------------
*/
-static H5_INLINE unsigned H5_ATTR_UNUSED
+static inline unsigned H5_ATTR_UNUSED
H5VM_log2_gen(uint64_t n)
{
unsigned r; /* r will be log2(n) */
@@ -439,7 +439,7 @@ static const unsigned MultiplyDeBruijnBitPosition[32] = {0, 1, 28, 2, 29, 14,
*
*-------------------------------------------------------------------------
*/
-static H5_INLINE H5_ATTR_PURE unsigned
+static inline H5_ATTR_PURE unsigned
H5VM_log2_of2(uint32_t n)
{
#ifndef NDEBUG
@@ -463,7 +463,7 @@ H5VM_log2_of2(uint32_t n)
*
*-------------------------------------------------------------------------
*/
-static H5_INLINE H5_ATTR_CONST hsize_t
+static inline H5_ATTR_CONST hsize_t
H5VM_power2up(hsize_t n)
{
hsize_t ret_value = 1; /* Return value */
@@ -495,7 +495,7 @@ H5VM_power2up(hsize_t n)
*
*-------------------------------------------------------------------------
*/
-static H5_INLINE unsigned H5_ATTR_UNUSED
+static inline unsigned H5_ATTR_UNUSED
H5VM_limit_enc_size(uint64_t limit)
{
return (H5VM_log2_gen(limit) / 8) + 1;
@@ -527,7 +527,7 @@ static const unsigned char H5VM_bit_clear_g[8] = {0x7F, 0xBF, 0xDF, 0xEF, 0xF7,
*
*-------------------------------------------------------------------------
*/
-static H5_INLINE hbool_t H5_ATTR_UNUSED
+static inline hbool_t H5_ATTR_UNUSED
H5VM_bit_get(const unsigned char *buf, size_t offset)
{
/* Test the appropriate bit in the buffer */
@@ -557,7 +557,7 @@ H5VM_bit_get(const unsigned char *buf, size_t offset)
*
*-------------------------------------------------------------------------
*/
-static H5_INLINE void H5_ATTR_UNUSED
+static inline void H5_ATTR_UNUSED
H5VM_bit_set(unsigned char *buf, size_t offset, hbool_t val)
{
/* Set/reset the appropriate bit in the buffer */
diff --git a/src/H5private.h b/src/H5private.h
index 64ab988..0d6377c 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -190,23 +190,6 @@
#endif /*H5_HAVE_WIN32_API*/
-/* Various ways that inline functions can be declared */
-#if defined(H5_HAVE___INLINE__)
-/* GNU (alternative form) */
-#define H5_INLINE __inline__
-#elif defined(H5_HAVE___INLINE)
-/* Visual Studio */
-#define H5_INLINE __inline
-#elif defined(H5_HAVE_INLINE)
-/* GNU, C++
- * Use "inline" as a last resort on the off-chance that there will
- * be C++ problems.
- */
-#define H5_INLINE inline
-#else
-#define H5_INLINE
-#endif /* inline choices */
-
#ifndef F_OK
#define F_OK 00
#define W_OK 02