Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 587478b in mainline


Ignore:
Timestamp:
2018-06-14T19:02:26Z (3 years ago)
Author:
Jiří Zárevúcky <jiri.zarevucky@…>
Branches:
master
Children:
3b1cc8d
Parents:
2f7d77c
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.

Location:
uspace
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/pci/pciintel/pci.c

    r2f7d77c r587478b  
    6363#define NAME "pciintel"
    6464
    65 #define CONF_ADDR_ENABLE        (1 << 31)
     65#define CONF_ADDR_ENABLE        (((unsigned)1) << 31)
    6666#define CONF_ADDR(bus, dev, fn, reg) \
    6767        ((bus << 16) | (dev << 11) | (fn << 8) | (reg & ~3))
  • uspace/lib/c/include/io/pixel.h

    r2f7d77c 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.