Skip to content
Snippets Groups Projects
Commit 59b1d62a authored by Thomas Jahns's avatar Thomas Jahns :cartwheel:
Browse files

Annotate incorrect compiler warning.

parent 14f4909d
No related branches found
No related tags found
2 merge requests!91Add alternative code path for huge buffers.,!89Miscellaneous fixes and CDI-PIO improvements
......@@ -95,6 +95,13 @@ set64(unsigned char *buf, uint64_t v)
return sizeof(v);
}
/* gcc versions 4.5 up to 9.4 generate an incorrect warning for the
* summation below */
#if defined __GNUC__ && ((__GNUC__ == 4 && __GNUC_MINOR__ > 5) || __GNUC__ > 4) && __GNUC__ <= 9
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
static void
fletcher8(const unsigned char *buf, size_t len, uint8_t *sum1out, uint8_t *sum2out)
{
......@@ -111,6 +118,10 @@ fletcher8(const unsigned char *buf, size_t len, uint8_t *sum1out, uint8_t *sum2o
*sum2out = (uint8_t)sum2;
}
#if defined __GNUC__ && ((__GNUC__ == 4 && __GNUC_MINOR__ > 5) || __GNUC__ > 4) && __GNUC__ <= 9
#pragma GCC diagnostic pop
#endif
static uint8_t
fletcher8_check1(uint8_t sum1, uint8_t sum2)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment