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

Changeset 8591b31 in mainline


Ignore:
Timestamp:
2018-09-20T16:13:43Z (3 years ago)
Author:
Jiří Zárevúcky <jiri.zarevucky@…>
Branches:
lfn, master
Children:
cbc3587
Parents:
9a5ae815
Message:

Fix most clang issues

Build error in futex.c remains because the proper solution of using
type _Atomic(fibril_t *) can't be parsed by sycek.

Files:
6 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/atomic.h

    r9a5ae815 r8591b31  
    6868
    6969#define local_atomic_exchange(var_addr, new_val) \
    70         atomic_exchange_explicit(var_addr, new_val, memory_order_relaxed)
     70        atomic_exchange_explicit( \
     71            (_Atomic typeof(*(var_addr)) *) (var_addr), \
     72            (new_val), memory_order_relaxed)
    7173
    7274#endif
  • uspace/Makefile.common

    r9a5ae815 r8591b31  
    181181        -Wextra \
    182182        -Wno-unused-parameter \
    183         -Wno-nonnull-compare \
    184183        -Wmissing-prototypes \
    185184        -Wwrite-strings \
     
    200199ifeq ($(COMPILER),clang)
    201200        DEFAULT_CFLAGS += \
     201                -Wno-missing-braces \
    202202                -Wno-missing-field-initializers \
    203203                -Wno-typedef-redefinition \
     
    205205else
    206206        DEFAULT_CFLAGS += \
     207                -Wno-nonnull-compare \
    207208                -Wno-clobbered
    208209endif
  • uspace/app/tester/print/print3.c

    r9a5ae815 r8591b31  
    3434#define BUFFER_SIZE  32
    3535
     36#ifndef __clang__
    3637#pragma GCC diagnostic ignored "-Wformat-truncation"
     38#endif
    3739
    3840const char *test_print3(void)
  • uspace/lib/c/generic/private/futex.h

    r9a5ae815 r8591b31  
    4141#include <libc.h>
    4242#include <time.h>
     43#include <fibril.h>
    4344
    4445typedef struct futex {
    4546        volatile atomic_int val;
    4647#ifdef CONFIG_DEBUG_FUTEX
    47         void *owner;
     48        // FIXME: Should be _Atomic(fibril_t *)
     49        fibril_t *owner;
    4850#endif
    4951} futex_t;
  • uspace/lib/c/test/string.c

    r9a5ae815 r8591b31  
    3333#include <pcut/pcut.h>
    3434
     35#ifndef __clang__
    3536#pragma GCC diagnostic ignored "-Wstringop-truncation"
    3637#pragma GCC diagnostic ignored "-Wstringop-overflow"
     38#endif
    3739
    3840PCUT_INIT;
  • uspace/lib/virtio/virtio.c

    r9a5ae815 r8591b31  
    127127        for (unsigned i = 0; i < size; i++) {
    128128                virtio_virtq_desc_set(vdev, num, i, 0, 0,
    129                     VIRTQ_DESC_F_NEXT, (i + 1 == size) ? -1U : i + 1);
     129                    VIRTQ_DESC_F_NEXT, (i + 1 == size) ? 0xffffu : i + 1);
    130130        }
    131131        *head = 0;
Note: See TracChangeset for help on using the changeset viewer.