Changeset 9675296 in mainline


Ignore:
Timestamp:
2019-07-04T13:00:35Z (5 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
53afa639
Parents:
98c4c16
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2019-07-04 12:49:24)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2019-07-04 13:00:35)
Message:

Some clang fixes

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • abi/include/abi/cap.h

    r98c4c16 r9675296  
    3939#include <stdint.h>
    4040
    41 enum {
    42         CAP_NIL = 0,
    43 };
    44 
    4541typedef void *cap_handle_t;
    4642
     
    5652typedef struct {
    5753} *cap_waitq_handle_t;
     54
     55static cap_handle_t const CAP_NIL = 0;
    5856
    5957static inline bool cap_handle_valid(cap_handle_t handle)
  • kernel/generic/src/cap/cap.c

    r98c4c16 r9675296  
    8888#include <stdlib.h>
    8989
    90 #define CAPS_START      (CAP_NIL + 1)
    91 #define CAPS_SIZE       (INT_MAX - CAPS_START)
     90#define CAPS_START      ((intptr_t) CAP_NIL + 1)
     91#define CAPS_SIZE       (INT_MAX - (int) CAPS_START)
    9292#define CAPS_LAST       (CAPS_SIZE - 1)
    9393
  • kernel/generic/src/lib/strtol.c

    r98c4c16 r9675296  
    245245}
    246246
    247 static inline intmax_t _strtosigned(const char *nptr, char **endptr, int base,
    248     intmax_t min, intmax_t max, errno_t *err, bool nonstd)
    249 {
    250         bool sgn = false;
    251         uintmax_t number = _strtoumax(nptr, endptr, base, &sgn, err, nonstd);
    252 
    253         if (number > (uintmax_t) max) {
    254                 if (sgn && (number - 1 == (uintmax_t) max)) {
    255                         return min;
    256                 }
    257 
    258                 *err = nonstd ? EOVERFLOW : ERANGE;
    259                 return (sgn ? min : max);
    260         }
    261 
    262         return (sgn ? -number : number);
    263 }
    264 
    265247static inline uintmax_t _strtounsigned(const char *nptr, char **endptr, int base,
    266248    uintmax_t max, errno_t *err, bool nonstd)
  • uspace/lib/cpp/include/cstddef

    r98c4c16 r9675296  
    3232#include <stddef.h>
    3333
     34#ifdef __clang__
     35typedef decltype(nullptr) nullptr_t;
     36#endif
     37
    3438namespace std
    3539{
Note: See TracChangeset for help on using the changeset viewer.