mirror of
https://github.com/systemd/systemd.git
synced 2025-01-25 10:04:04 +03:00
tree-wide: Mark some constants as unsigned
All these are really unsigned and used as such. This silences some -Wformat-signedness warnings with gcc.
This commit is contained in:
parent
1dbab956ba
commit
63b9838639
@ -13,12 +13,12 @@
|
||||
#include <unistd.h>
|
||||
|
||||
/* Users managed by systemd-homed. See https://systemd.io/UIDS-GIDS for details how this range fits into the rest of the world */
|
||||
#define HOME_UID_MIN 60001
|
||||
#define HOME_UID_MAX 60513
|
||||
#define HOME_UID_MIN ((uid_t) 60001)
|
||||
#define HOME_UID_MAX ((uid_t) 60513)
|
||||
|
||||
/* Users mapped from host into a container */
|
||||
#define MAP_UID_MIN 60514
|
||||
#define MAP_UID_MAX 60577
|
||||
#define MAP_UID_MIN ((uid_t) 60514)
|
||||
#define MAP_UID_MAX ((uid_t) 60577)
|
||||
|
||||
bool uid_is_valid(uid_t uid);
|
||||
|
||||
|
@ -43,8 +43,8 @@
|
||||
/* internal helper */
|
||||
#define ANY_LUKS "LUKS"
|
||||
/* as in src/cryptsetup.h */
|
||||
#define CRYPT_SECTOR_SIZE 512
|
||||
#define CRYPT_MAX_SECTOR_SIZE 4096
|
||||
#define CRYPT_SECTOR_SIZE 512U
|
||||
#define CRYPT_MAX_SECTOR_SIZE 4096U
|
||||
|
||||
typedef enum PassphraseType {
|
||||
PASSPHRASE_NONE,
|
||||
|
@ -65,7 +65,7 @@
|
||||
* to store arbitrary amounts either. As we are not stingy here, we
|
||||
* allow 4k.
|
||||
*/
|
||||
#define WALL_MESSAGE_MAX 4096
|
||||
#define WALL_MESSAGE_MAX 4096U
|
||||
|
||||
#define SHUTDOWN_SCHEDULE_FILE "/run/systemd/shutdown/scheduled"
|
||||
|
||||
|
@ -4,8 +4,8 @@
|
||||
#include "conf-parser.h"
|
||||
#include "netdev.h"
|
||||
|
||||
#define LINK_BRIDGE_PORT_PRIORITY_INVALID 128
|
||||
#define LINK_BRIDGE_PORT_PRIORITY_MAX 63
|
||||
#define LINK_BRIDGE_PORT_PRIORITY_INVALID 128U
|
||||
#define LINK_BRIDGE_PORT_PRIORITY_MAX 63U
|
||||
|
||||
typedef struct Bridge {
|
||||
NetDev meta;
|
||||
|
@ -45,7 +45,7 @@
|
||||
#include "util.h"
|
||||
|
||||
/* Let's assume that anything above this number is a user misconfiguration. */
|
||||
#define MAX_NTP_SERVERS 128
|
||||
#define MAX_NTP_SERVERS 128U
|
||||
|
||||
static int network_resolve_netdev_one(Network *network, const char *name, NetDevKind kind, NetDev **ret) {
|
||||
const char *kind_string;
|
||||
|
@ -23,7 +23,7 @@
|
||||
#define LINE_CHUNK 8*1024u
|
||||
|
||||
/* The maximum number of fields in an entry */
|
||||
#define ENTRY_FIELD_COUNT_MAX 1024
|
||||
#define ENTRY_FIELD_COUNT_MAX 1024u
|
||||
|
||||
typedef struct JournalImporter {
|
||||
int fd;
|
||||
|
Loading…
x
Reference in New Issue
Block a user