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

Changeset 90c340fb in mainline


Ignore:
Timestamp:
2017-10-26T23:44:55Z (3 years ago)
Author:
jzr <zarevucky.jiri@…>
Branches:
master
Children:
37e8c4a
Parents:
e4c8e3cf
Message:

Convert two "old style" static asserts.

Location:
uspace/lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/drv/generic/remote_usb.c

    re4c8e3cf r90c340fb  
    3535
    3636#include <async.h>
     37#include <assert.h>
    3738#include <macros.h>
    3839#include <errno.h>
     
    169170}
    170171
    171 int static_assert[sizeof(sysarg_t) >= 4 ? 1 : -1];
     172static_assert(sizeof(sysarg_t) >= 4);
     173
    172174typedef union {
    173175        uint8_t arr[sizeof(sysarg_t)];
  • uspace/lib/usb/include/usb/request.h

    re4c8e3cf r90c340fb  
    3737
    3838#include <stdint.h>
     39#include <assert.h>
    3940
    4041/** Standard device request. */
     
    107108} __attribute__ ((packed)) usb_device_request_setup_packet_t;
    108109
    109 int assert[(sizeof(usb_device_request_setup_packet_t) == 8) ? 1: -1];
     110static_assert(sizeof(usb_device_request_setup_packet_t) == 8);
    110111
    111112int usb_request_needs_toggle_reset(
Note: See TracChangeset for help on using the changeset viewer.