From: Jo-Philipp Wich Date: Tue, 28 Feb 2017 22:53:41 +0000 (+0100) Subject: pkg: mark bit fields in pkg_t unsigned X-Git-Url: http://git.openwrt.org/?p=project%2Fopkg-lede.git;a=commitdiff_plain;h=1fdc2cac54c34caf9c196799cf63add009523c9a;ds=sidebyside pkg: mark bit fields in pkg_t unsigned Qualify the bit field type as unsigned int to ensure that set flags are interpreted as "1" and not "-1". Signed-off-by: Jo-Philipp Wich --- diff --git a/libopkg/pkg.h b/libopkg/pkg.h index 1299d68..04ca85e 100644 --- a/libopkg/pkg.h +++ b/libopkg/pkg.h @@ -156,16 +156,16 @@ struct pkg { still being used within an outer loop. */ int installed_files_ref_cnt; - int essential:1; + unsigned int essential:1; /* Adding this flag, to "force" opkg to choose a "provided_by_hand" package, if there are multiple choice */ - int provided_by_hand:1; + unsigned int provided_by_hand:1; /* this flag specifies whether the package was installed to satisfy another * package's dependancies */ - int auto_installed:1; - int is_upgrade:1; + unsigned int auto_installed:1; + unsigned int is_upgrade:1; - int arch_index:3; + unsigned int arch_index:3; struct blob_buf blob; };