]> git.ipfire.org Git - thirdparty/plymouth.git/commit
space-flares: Fix compiler warning
authorHans de Goede <hdegoede@redhat.com>
Mon, 30 Sep 2019 09:12:45 +0000 (11:12 +0200)
committerHans de Goede <hdegoede@redhat.com>
Mon, 30 Sep 2019 09:15:31 +0000 (11:15 +0200)
commitbf6ef0a4815d6331e7d903eded14574a32f66ff3
treed9823242514d0522376a87b53571cd7ea2e37d2e
parentc7965ea19abf63564bee5b14557885c9dc6c3c57
space-flares: Fix compiler warning

Recent gcc versions give the following compiler warning with space-flares:
./plugin.c: In function ‘star_bg_update’:
./plugin.c:762:21: warning: taking the absolute value of unsigned type ‘uint32_t’ {aka ‘unsigned int’} has no effect [-Wabsolute-value]
  762 |                 if (abs (((image_data[x + y * width] >> 16) & 0xff) - ((pixel_colour >> 16) & 0xff)) > 8) {
      |                     ^~~

This commit fixes this, assuming that gcc actually optimises the abs()
away, this will also make the code behave as intended again.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
src/plugins/splash/space-flares/plugin.c