On Mon, 16 May 2011, Cristian Ionescu-Idbohrn wrote:
> On Mon, 16 May 2011, Denys Vlasenko wrote:
> > On Saturday 07 May 2011 16:48, Cristian Ionescu-Idbohrn wrote:
> > > On Sun, 1 May 2011, Denys Vlasenko wrote:
> > > > On Sunday 01 May 2011 10:38, Cristian Ionescu-Idbohrn wrote:
> > > > > On Sat, 30 Apr 2011, Denys Vlasenko wrote:
> > > > > > On Saturday 30 April 2011 18:34, Cristian Ionescu-Idbohrn wrote:
> > > > > > > dist: debian unstable (aka sid)
> > > > > > > gcc-4.6.real (Debian 4.6.0-6) 4.6.1 20110428 (prerelease)
> > > > > > > BusyBox v1.19.0.git (2011-04-30 18:22:26 CEST) multi-call binary.
> > > > > > >
> > > > > > > I'd like to understand what's going on, why, and what I can do
> > > > > > > about it:
> > > > > > >
> > > > > > > HOSTCC scripts/kconfig/conf.o
> > > > > > > scripts/kconfig/conf.c: In function 'conf_string':
> > > > > > > scripts/kconfig/conf.c:176:20: warning: variable 'help' set but
> > > > > > > not used
> > > > > > > [-Wunused-but-set-variable]
> > > > > >
> > > > > > Above, variable "help" is not used and can be deleted.
> > > > > > You can send a patch which fixes it.
> > > > >
> > > > > Alright. See attached patch proposals.
> > > > > 3 + 2 + 1 warnings may now be gone, half a gazillion still lurking
> > > > > around ;)
> > > >
> > > > Applied, thanks
> > >
> > > Along the same lines, see attached patch proposals.
> >
> > Applied, thanks
>
> Thanks. I still find some of those things after todays git pull:
Let me try again. The attached patch removes these warnings:
> archival/dpkg.c: In function 'set_status':
> archival/dpkg.c:712:6: warning: variable 'status_len' set but not used
> [-Wunused-but-set-variable]
> archival/dpkg.c:711:6: warning: variable 'flag_len' set but not used
> [-Wunused-but-set-variable]
> archival/dpkg.c:710:6: warning: variable 'want_len' set but not used
> [-Wunused-but-set-variable]
but not these:
> debianutils/run_parts.c: In function 'run_parts_main':
> debianutils/run_parts.c:158:6: warning: array subscript is above array bounds
> [-Warray-bounds]
One warning:
> libbb/appletlib.c: In function 'check_suid':
> libbb/appletlib.c:566:2: warning: label 'ret' defined but not used
> [-Wunused-label]
removed (see attached), two left to go:
> libbb/appletlib.c: In function 'busybox_main':
> libbb/appletlib.c:698:7: warning: variable 'use_symbolic_links' set but not
> used [-Wunused-but-set-variable]
> libbb/appletlib.c: In function 'main':
> libbb/appletlib.c:791:2: warning: implicit declaration of function
> '__sysconf' [-Wimplicit-function-declaration]
>
> but I believe my previous patch proposals covered the archival/dpkg.c one.
Cheers,
--
Cristian
commit 77d496d2bd030096c19e20a0ebe465f998974b9a
Author: Cristian Ionescu-Idbohrn <[email protected]>
Date: Sat May 7 12:06:15 2011 +0200
The [-Wunused-but-set-variable] warnings.
archival/dpkg.c:712:6: warning: variable 'status_len' set but not used
archival/dpkg.c:711:6: warning: variable 'flag_len' set but not used
archival/dpkg.c:710:6: warning: variable 'want_len' set but not used
Signed-off-by: Cristian Ionescu-Idbohrn <[email protected]>
diff --git a/archival/dpkg.c b/archival/dpkg.c
index f8e349d..8899d17 100644
--- a/archival/dpkg.c
+++ b/archival/dpkg.c
@@ -702,28 +702,21 @@ static unsigned get_status(const unsigned status_node, const int num)
static void set_status(const unsigned status_node_num, const char *new_value, const int position)
{
- const unsigned new_value_len = strlen(new_value);
const unsigned new_value_num = search_name_hashtable(new_value);
unsigned want = get_status(status_node_num, 1);
unsigned flag = get_status(status_node_num, 2);
unsigned status = get_status(status_node_num, 3);
- int want_len = strlen(name_hashtable[want]);
- int flag_len = strlen(name_hashtable[flag]);
- int status_len = strlen(name_hashtable[status]);
char *new_status;
switch (position) {
case 1:
want = new_value_num;
- want_len = new_value_len;
break;
case 2:
flag = new_value_num;
- flag_len = new_value_len;
break;
case 3:
status = new_value_num;
- status_len = new_value_len;
break;
default:
bb_error_msg_and_die("DEBUG ONLY: this shouldnt happen");
commit 23a06f334430f183c69bbcc645ed9365edf603e9
Author: Cristian Ionescu-Idbohrn <[email protected]>
Date: Wed May 18 17:50:14 2011 +0200
Corrected another warning.
libbb/appletlib.c: In function 'check_suid':
libbb/appletlib.c:566:2: warning: label 'ret' defined but not used [-Wunused-label]
Signed-off-by: Cristian Ionescu-Idbohrn <[email protected]>
diff --git a/libbb/appletlib.c b/libbb/appletlib.c
index 30224ed..0dac0ba 100644
--- a/libbb/appletlib.c
+++ b/libbb/appletlib.c
@@ -563,8 +563,8 @@ static void check_suid(int applet_no)
xsetgid(rgid); /* drop all privileges */
xsetuid(ruid);
}
- ret: ;
# if ENABLE_FEATURE_SUID_CONFIG
+ ret: ;
llist_free((llist_t*)suid_config, NULL);
# endif
}
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox