This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

pm_buffer_block_acquire: nasty warning

Folks,

One of the devs here found that all warnings were switched off in SES, so I've recompiled and got rid of most of the 1400 odd (sic) warnings by suppressing unused parameters and expansion to defined, then going and fixing other, obvious, issues.

However, there is one that remains me that alarms me and that is this in  pm_buffer.c in uint8_t pm_buffer_block_acquire(pm_buffer_t * p_buffer, uint32_t n_blocks) :

if ((i - first_locked_mutex + 1) == n_blocks)

Which gives this error:

comparison of integer expressions of different signedness: ‘int’ and ‘uint32_t’ {aka ‘unsigned int’} [-Wsign-compare]

Is anyone aware of this? I'm using nRF5_SDK_15.3.0_59ac345 and have modified the blinky project for our use.

I am guessing that the devs there had these warnings switched off too and might not be aware of it, but that could potentially be a nasty bug.

Edit: what's weird about this though is that the different variables, although different types all seem to be unsigned...

Related