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

Changeset 0a520db in mainline


Ignore:
Timestamp:
2019-01-10T18:39:16Z (2 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master
Children:
a91b828
Parents:
f47c2dc1
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2019-01-10 18:38:24)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2019-01-10 18:39:16)
Message:

Change static_assert to its standard definition

Location:
uspace
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/sbi/src/bigint.c

    rf47c2dc1 r0a520db  
    379379        printf("Convert bigint to string.\n");
    380380#endif
    381         static_assert(BIGINT_BASE >= 10);
     381        static_assert(BIGINT_BASE >= 10, "");
    382382
    383383        /* Compute number of characters. */
  • uspace/drv/bus/usb/ehci/hw_struct/transfer_descriptor.h

    rf47c2dc1 r0a520db  
    8888#define TD_BUFFER_POINTER_OFFSET_MASK    0xfff
    8989
    90 static_assert(sizeof(td_t) % 32 == 0);
     90static_assert(sizeof(td_t) % 32 == 0, "");
    9191
    9292static inline bool td_active(const td_t *td)
  • uspace/drv/bus/usb/ohci/hw_struct/hcca.h

    rf47c2dc1 r0a520db  
    6161} hcca_t;
    6262
    63 static_assert(sizeof(hcca_t) == 256);
     63static_assert(sizeof(hcca_t) == 256, "");
    6464
    6565/** Allocate properly aligned structure.
  • uspace/drv/bus/usb/uhci/uhci_batch.c

    rf47c2dc1 r0a520db  
    9696int uhci_transfer_batch_prepare(uhci_transfer_batch_t *uhci_batch)
    9797{
    98         static_assert((sizeof(td_t) % 16) == 0);
     98        static_assert((sizeof(td_t) % 16) == 0, "");
    9999
    100100        usb_transfer_batch_t *usb_batch = &uhci_batch->base;
  • uspace/drv/bus/usb/xhci/trb_ring.c

    rf47c2dc1 r0a520db  
    5353} __attribute__((aligned(PAGE_SIZE)));
    5454
    55 static_assert(sizeof(trb_segment_t) == PAGE_SIZE);
     55static_assert(sizeof(trb_segment_t) == PAGE_SIZE, "");
    5656
    5757/**
  • uspace/lib/c/generic/double_to_str.c

    rf47c2dc1 r0a520db  
    503503{
    504504        /* The whole computation assumes 64bit significand. */
    505         static_assert(sizeof(ieee_val.pos_val.significand) == sizeof(uint64_t));
     505        static_assert(sizeof(ieee_val.pos_val.significand) == sizeof(uint64_t), "");
    506506
    507507        if (ieee_val.is_special) {
     
    754754{
    755755        /* The whole computation assumes 64bit significand. */
    756         static_assert(sizeof(ieee_val.pos_val.significand) == sizeof(uint64_t));
     756        static_assert(sizeof(ieee_val.pos_val.significand) == sizeof(uint64_t), "");
    757757
    758758        if (ieee_val.is_special) {
  • uspace/lib/c/generic/ieee_double.c

    rf47c2dc1 r0a520db  
    4545        const int exponent_bias = 1075;
    4646
    47         static_assert(sizeof(val) == sizeof(uint64_t));
     47        static_assert(sizeof(val) == sizeof(uint64_t), "");
    4848
    4949        union {
  • uspace/lib/c/generic/time.c

    rf47c2dc1 r0a520db  
    7979clock_t clock(void)
    8080{
    81         static_assert(CLOCKS_PER_SEC == 1000000);
     81        static_assert(CLOCKS_PER_SEC == 1000000, "");
    8282
    8383        size_t count;
  • uspace/lib/c/include/assert.h

    rf47c2dc1 r0a520db  
    4242
    4343#ifndef __cplusplus
    44 #define static_assert(expr)     _Static_assert(expr, "")
     44#define static_assert _Static_assert
    4545#endif
    4646
  • uspace/lib/usb/include/usb/request.h

    rf47c2dc1 r0a520db  
    117117} __attribute__((packed)) usb_device_request_setup_packet_t;
    118118
    119 static_assert(sizeof(usb_device_request_setup_packet_t) == USB_SETUP_PACKET_SIZE);
     119static_assert(sizeof(usb_device_request_setup_packet_t) == USB_SETUP_PACKET_SIZE, "");
    120120
    121121#define GET_DEVICE_DESC(size) \
  • uspace/lib/usbdev/src/request.c

    rf47c2dc1 r0a520db  
    4545#define MAX_DATA_LENGTH ((size_t)(0xFFFF))
    4646
    47 static_assert(sizeof(usb_device_request_setup_packet_t) == 8);
     47static_assert(sizeof(usb_device_request_setup_packet_t) == 8, "");
    4848
    4949/** Generic wrapper for SET requests using standard control request format.
  • uspace/srv/locsrv/locsrv.c

    rf47c2dc1 r0a520db  
    14091409         */
    14101410        static_assert((INTERFACE_LOC_SUPPLIER & IFACE_EXCHANGE_MASK) ==
    1411             IFACE_EXCHANGE_SERIALIZE);
     1411            IFACE_EXCHANGE_SERIALIZE, "");
    14121412
    14131413        loc_server_t *server = loc_server_register();
  • uspace/srv/net/inetsrv/pdu.c

    rf47c2dc1 r0a520db  
    224224                return EINVAL;
    225225
    226         static_assert(sizeof(ip6_header_t) % 8 == 0);
     226        static_assert(sizeof(ip6_header_t) % 8 == 0, "");
    227227        assert(hdr_size % 8 == 0);
    228228        assert(offs % FRAG_OFFS_UNIT == 0);
Note: See TracChangeset for help on using the changeset viewer.