From: Yu Watanabe Date: Wed, 27 Jun 2018 06:46:43 +0000 (+0900) Subject: tree-wide: use 'signed int' instead of 'int' for bit field variables X-Git-Tag: v240~1020 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=845d247a3dbca437fd8a118a118328acb322e2c1;p=thirdparty%2Fsystemd.git tree-wide: use 'signed int' instead of 'int' for bit field variables Suggested by LGTM: https://lgtm.com/rules/1506024027114/ --- diff --git a/src/core/unit.h b/src/core/unit.h index b3131eba1bf..a9de983152f 100644 --- a/src/core/unit.h +++ b/src/core/unit.h @@ -352,7 +352,7 @@ typedef struct Unit { /* When writing transient unit files, stores which section we stored last. If < 0, we didn't write any yet. If * == 0 we are in the [Unit] section, if > 0 we are in the unit type-specific section. */ - int last_section_private:2; + signed int last_section_private:2; } Unit; typedef struct UnitStatusMessageFormats { diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c index d53b9a70267..0ccd3edcae5 100644 --- a/src/libsystemd/sd-event/sd-event.c +++ b/src/libsystemd/sd-event/sd-event.c @@ -92,7 +92,7 @@ struct sd_event_source { char *description; EventSourceType type:5; - int enabled:3; + signed int enabled:3; bool pending:1; bool dispatching:1; bool floating:1;