Skip to content

Commit

Permalink
Clear warning about redefinition of macro (#48422)
Browse files Browse the repository at this point in the history
`FORCE_INLINE` is also defined in `src/support/dtypes.h`, and both `dtypes.h`
and `MurmurHash3.c` are included by `src/support/hashing.c`, causing a clash:

```
In file included from /home/mose/repo/julia/src/support/hashing.c:51:
/home/mose/repo/julia/src/support/MurmurHash3.c:15: warning: "FORCE_INLINE" redefined
   15 | #define FORCE_INLINE inline __attribute__((always_inline))
      |
In file included from /home/mose/repo/julia/src/support/hashing.c:7:
/home/mose/repo/julia/src/support/dtypes.h:120: note: this is the location of the previous definition
  120 | #define FORCE_INLINE static inline __attribute__((always_inline))
      |
```
  • Loading branch information
giordano authored Feb 1, 2023
1 parent 798b589 commit d918576
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/support/MurmurHash3.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@
// non-native version will be less than optimal.

#include "MurmurHash3.h"
#include "dtypes.h"

//-----------------------------------------------------------------------------
// Platform-specific functions and macros

#define FORCE_INLINE inline __attribute__((always_inline))

static inline uint32_t rotl32 ( uint32_t x, int8_t r )
{
return (x << r) | (x >> (32 - r));
Expand Down

0 comments on commit d918576

Please sign in to comment.