Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4887842c authored by Mark Salyzyn's avatar Mark Salyzyn
Browse files

include: cleanup for -Wsystem-header

- warnings as errors, or errors introduced when -Wsystem-header
  was experimentally introduced.

Change-Id: Ia8f5b3c1c1096e191741223d52526aa48c7f1cc4
parent 818f8004
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -59,7 +59,7 @@ static inline void bitmask_init(unsigned int *bitmask, int num_bits)
static inline int bitmask_ffz(unsigned int *bitmask, int num_bits)
{
    int bit, result;
    unsigned int i;
    size_t i;

    for (i = 0; i < BITS_TO_WORDS(num_bits); i++) {
        bit = ffs(~bitmask[i]);
@@ -77,7 +77,7 @@ static inline int bitmask_ffz(unsigned int *bitmask, int num_bits)

static inline int bitmask_weight(unsigned int *bitmask, int num_bits)
{
    int i;
    size_t i;
    int weight = 0;

    for (i = 0; i < BITS_TO_WORDS(num_bits); i++)
+1 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@
#define __CUTILS_FS_H

#include <sys/types.h>
#include <unistd.h>

/*
 * TEMP_FAILURE_RETRY is defined by some, but not all, versions of
+1 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@
#include <inttypes.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <sys/cdefs.h>
#include <sys/types.h>
#include <unistd.h>
+8 −5
Original line number Diff line number Diff line
@@ -67,7 +67,8 @@ public:
    // timespec
    bool operator== (const timespec &T) const
    {
        return (tv_sec == T.tv_sec) && (tv_nsec == T.tv_nsec);
        return (tv_sec == static_cast<uint32_t>(T.tv_sec))
            && (tv_nsec == static_cast<uint32_t>(T.tv_nsec));
    }
    bool operator!= (const timespec &T) const
    {
@@ -75,8 +76,9 @@ public:
    }
    bool operator< (const timespec &T) const
    {
        return (tv_sec < T.tv_sec)
            || ((tv_sec == T.tv_sec) && (tv_nsec < T.tv_nsec));
        return (tv_sec < static_cast<uint32_t>(T.tv_sec))
            || ((tv_sec == static_cast<uint32_t>(T.tv_sec))
                && (tv_nsec < static_cast<uint32_t>(T.tv_nsec)));
    }
    bool operator>= (const timespec &T) const
    {
@@ -84,8 +86,9 @@ public:
    }
    bool operator> (const timespec &T) const
    {
        return (tv_sec > T.tv_sec)
            || ((tv_sec == T.tv_sec) && (tv_nsec > T.tv_nsec));
        return (tv_sec > static_cast<uint32_t>(T.tv_sec))
            || ((tv_sec == static_cast<uint32_t>(T.tv_sec))
                && (tv_nsec > static_cast<uint32_t>(T.tv_nsec)));
    }
    bool operator<= (const timespec &T) const
    {
+2 −3
Original line number Diff line number Diff line
@@ -62,9 +62,8 @@ struct logger_entry_v3 {

/*
 * The maximum size of the log entry payload that can be
 * written to the kernel logger driver. An attempt to write
 * more than this amount to /dev/log/* will result in a
 * truncated log entry.
 * written to the logger. An attempt to write more than
 * this amount will result in a truncated log entry.
 */
#define LOGGER_ENTRY_MAX_PAYLOAD	4076

Loading