[git commit] appletlib: avoid warning on unused function ingroup
Denys Vlasenko
vda.linux at googlemail.com
Tue Jan 3 11:01:15 UTC 2017
commit: https://git.busybox.net/busybox/commit/?id=f1d76b64a0f9da5a6bd068fff0ac3dc66422a3ab
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master
libbb/appletlib.c:558:12: warning: 'ingroup' defined but
not used [-Wunused-function]
static int ingroup(uid_t u, gid_t g)
^~~~~~~
That function is used only if FEATURE_SUID_CONFIG is also enabled.
Signed-off-by: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn at axis.com>
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
libbb/appletlib.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libbb/appletlib.c b/libbb/appletlib.c
index ee8b4ec..805cd3a 100644
--- a/libbb/appletlib.c
+++ b/libbb/appletlib.c
@@ -554,6 +554,7 @@ static inline void parse_config_file(void)
# if ENABLE_FEATURE_SUID && NUM_APPLETS > 0
+# if ENABLE_FEATURE_SUID_CONFIG
/* check if u is member of group g */
static int ingroup(uid_t u, gid_t g)
{
@@ -568,6 +569,7 @@ static int ingroup(uid_t u, gid_t g)
}
return 0;
}
+# endif
static void check_suid(int applet_no)
{
More information about the busybox-cvs
mailing list