Changeset 587478b in mainline for uspace/lib/c/include/io/pixel.h


Ignore:
Timestamp:
2018-06-14T19:02:26Z (7 years ago)
Author:
Jiří Zárevúcky <jiri.zarevucky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3b1cc8d
Parents:
2f7d77c6
git-author:
Jiří Zárevúcky <jiri.zarevucky@…> (2018-06-14 18:35:46)
git-committer:
Jiří Zárevúcky <jiri.zarevucky@…> (2018-06-14 19:02:26)
Message:

Fix some undefined behaviors.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/include/io/pixel.h

    r2f7d77c6 r587478b  
    5050
    5151#define PIXEL(a, r, g, b) \
    52         ((((a) & 0xff) << 24) | (((r) & 0xff) << 16) | \
    53         (((g) & 0xff) << 8) | ((b) & 0xff))
     52        ((((unsigned)(a) & 0xff) << 24) | (((unsigned)(r) & 0xff) << 16) | \
     53        (((unsigned)(g) & 0xff) << 8) | ((unsigned)(b) & 0xff))
    5454
    5555typedef uint32_t pixel_t;
Note: See TracChangeset for help on using the changeset viewer.