* [PATCH] Fix function definition and declaration mismatch
@ 2018-08-01 6:34 dev.madaari
2018-08-09 6:20 ` Udit agarwal
0 siblings, 1 reply; 3+ messages in thread
From: dev.madaari @ 2018-08-01 6:34 UTC (permalink / raw)
To: fio; +Cc: Udit kumar agarwal
From: Udit kumar agarwal <dev.madaari@gmail.com>
during the declaration of, let's say XXH32_init parameter type is
'unsigned int' while during the definition it is 'uint32_t'. Now, on
most desktop os, they are are usually same, however on some embedded
platforms, for example RTEMS which uses newlib as it's standard c library,
they both are different.
---
crc/xxhash.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/crc/xxhash.h b/crc/xxhash.h
index 8850d20..9019089 100644
--- a/crc/xxhash.h
+++ b/crc/xxhash.h
@@ -107,9 +107,9 @@ XXH32() :
// Advanced Hash Functions
//****************************
-void* XXH32_init (unsigned int seed);
+void* XXH32_init (uint32_t seed);
XXH_errorcode XXH32_update (void* state, const void* input, int len);
-unsigned int XXH32_digest (void* state);
+uint32_t XXH32_digest (void* state);
/*
These functions calculate the xxhash of an input provided in several small packets,
@@ -135,7 +135,7 @@ Memory will be freed by XXH32_digest().
int XXH32_sizeofState(void);
-XXH_errorcode XXH32_resetState(void* state, unsigned int seed);
+XXH_errorcode XXH32_resetState(void* state, uint32_t seed);
#define XXH32_SIZEOFSTATE 48
typedef struct { long long ll[(XXH32_SIZEOFSTATE+(sizeof(long long)-1))/sizeof(long long)]; } XXH32_stateSpace_t;
@@ -151,7 +151,7 @@ use the structure XXH32_stateSpace_t, which will ensure that memory space is lar
*/
-unsigned int XXH32_intermediateDigest (void* state);
+uint32_t XXH32_intermediateDigest (void* state);
/*
This function does the same as XXH32_digest(), generating a 32-bit hash,
but preserve memory context.
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Fix function definition and declaration mismatch
2018-08-01 6:34 [PATCH] Fix function definition and declaration mismatch dev.madaari
@ 2018-08-09 6:20 ` Udit agarwal
2018-08-09 15:21 ` Jens Axboe
0 siblings, 1 reply; 3+ messages in thread
From: Udit agarwal @ 2018-08-09 6:20 UTC (permalink / raw)
To: fio, Jens Axboe; +Cc: Udit kumar agarwal
[-- Attachment #1: Type: text/plain, Size: 1951 bytes --]
Hi,
Just a ping ;) Does this patch sounds reasonable?
On Wed, Aug 1, 2018 at 12:04 PM, <dev.madaari@gmail.com> wrote:
> From: Udit kumar agarwal <dev.madaari@gmail.com>
>
> during the declaration of, let's say XXH32_init parameter type is
> 'unsigned int' while during the definition it is 'uint32_t'. Now, on
> most desktop os, they are are usually same, however on some embedded
> platforms, for example RTEMS which uses newlib as it's standard c library,
> they both are different.
> ---
> crc/xxhash.h | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/crc/xxhash.h b/crc/xxhash.h
> index 8850d20..9019089 100644
> --- a/crc/xxhash.h
> +++ b/crc/xxhash.h
> @@ -107,9 +107,9 @@ XXH32() :
> // Advanced Hash Functions
> //****************************
>
> -void* XXH32_init (unsigned int seed);
> +void* XXH32_init (uint32_t seed);
> XXH_errorcode XXH32_update (void* state, const void* input, int len);
> -unsigned int XXH32_digest (void* state);
> +uint32_t XXH32_digest (void* state);
>
> /*
> These functions calculate the xxhash of an input provided in several
> small packets,
> @@ -135,7 +135,7 @@ Memory will be freed by XXH32_digest().
>
>
> int XXH32_sizeofState(void);
> -XXH_errorcode XXH32_resetState(void* state, unsigned int seed);
> +XXH_errorcode XXH32_resetState(void* state, uint32_t seed);
>
> #define XXH32_SIZEOFSTATE 48
> typedef struct { long long ll[(XXH32_SIZEOFSTATE+(sizeof(long
> long)-1))/sizeof(long long)]; } XXH32_stateSpace_t;
> @@ -151,7 +151,7 @@ use the structure XXH32_stateSpace_t, which will
> ensure that memory space is lar
> */
>
>
> -unsigned int XXH32_intermediateDigest (void* state);
> +uint32_t XXH32_intermediateDigest (void* state);
> /*
> This function does the same as XXH32_digest(), generating a 32-bit hash,
> but preserve memory context.
> --
> 1.9.1
>
>
--
Regards,
Udit kumar agarwal
http://uditagarwal.in/
[-- Attachment #2: Type: text/html, Size: 2790 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Fix function definition and declaration mismatch
2018-08-09 6:20 ` Udit agarwal
@ 2018-08-09 15:21 ` Jens Axboe
0 siblings, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2018-08-09 15:21 UTC (permalink / raw)
To: Udit agarwal, fio
On 8/9/18 12:20 AM, Udit agarwal wrote:
> Hi,
> Just a ping ;) Does this patch sounds reasonable?
Yep totally reasonable, had some vacation which is why it took a little
longer. Applied.
--
Jens Axboe
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-08-09 15:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-01 6:34 [PATCH] Fix function definition and declaration mismatch dev.madaari
2018-08-09 6:20 ` Udit agarwal
2018-08-09 15:21 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox