[Xenomai-git] Jan Kiszka : sysregd: Fix --linger support
Module: xenomai-3 Branch: master Commit: 9726d6e7db16f3e27aa0deb22dc0d4d06966e995 URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=9726d6e7db16f3e27aa0deb22dc0d4d06966e995 Author: Jan Kiszka Date: Sun Jan 4 14:14:34 2015 +0100 sysregd: Fix --linger support The corresponding option variable was never written, thus --linger had no effect. Fixing this makes the compiler complain about a false-positive uninitialized use of tmfd. Silence that. Signed-off-by: Jan Kiszka --- lib/copperplate/regd/regd.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/copperplate/regd/regd.c b/lib/copperplate/regd/regd.c index 43f763e..780a922 100644 --- a/lib/copperplate/regd/regd.c +++ b/lib/copperplate/regd/regd.c @@ -99,7 +99,7 @@ static const struct option options[] = { #define linger_opt 3 .name = "linger", .has_arg = 0, - .flag = NULL, + .flag = &linger, .val = 1, }, { @@ -273,7 +273,7 @@ static void handle_requests(void) { struct itimerspec its; fd_set refset, set; - int ret, s, tmfd; + int ret, s, tmfd = -1; uint64_t exp; char c; ___ Xenomai-git mailing list Xenomai-git@xenomai.org http://www.xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Jan Kiszka : sysregd: Fix --linger support
Module: xenomai-3 Branch: next Commit: 9726d6e7db16f3e27aa0deb22dc0d4d06966e995 URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=9726d6e7db16f3e27aa0deb22dc0d4d06966e995 Author: Jan Kiszka Date: Sun Jan 4 14:14:34 2015 +0100 sysregd: Fix --linger support The corresponding option variable was never written, thus --linger had no effect. Fixing this makes the compiler complain about a false-positive uninitialized use of tmfd. Silence that. Signed-off-by: Jan Kiszka --- lib/copperplate/regd/regd.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/copperplate/regd/regd.c b/lib/copperplate/regd/regd.c index 43f763e..780a922 100644 --- a/lib/copperplate/regd/regd.c +++ b/lib/copperplate/regd/regd.c @@ -99,7 +99,7 @@ static const struct option options[] = { #define linger_opt 3 .name = "linger", .has_arg = 0, - .flag = NULL, + .flag = &linger, .val = 1, }, { @@ -273,7 +273,7 @@ static void handle_requests(void) { struct itimerspec its; fd_set refset, set; - int ret, s, tmfd; + int ret, s, tmfd = -1; uint64_t exp; char c; ___ Xenomai-git mailing list Xenomai-git@xenomai.org http://www.xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Jan Kiszka : sysregd: Fix --linger support
Module: xenomai-3 Branch: next Commit: 01cb66ad1d851dc839e0376e8c12a131201aa03d URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=01cb66ad1d851dc839e0376e8c12a131201aa03d Author: Jan Kiszka Date: Sun Jan 4 14:14:34 2015 +0100 sysregd: Fix --linger support The corresponding option variable was never written, thus --linger had no effect. Fixing this makes the compiler complain about a false-positive uninitialized use of tmfd. Silence that. Signed-off-by: Jan Kiszka --- lib/copperplate/regd/regd.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/copperplate/regd/regd.c b/lib/copperplate/regd/regd.c index 43f763e..780a922 100644 --- a/lib/copperplate/regd/regd.c +++ b/lib/copperplate/regd/regd.c @@ -99,7 +99,7 @@ static const struct option options[] = { #define linger_opt 3 .name = "linger", .has_arg = 0, - .flag = NULL, + .flag = &linger, .val = 1, }, { @@ -273,7 +273,7 @@ static void handle_requests(void) { struct itimerspec its; fd_set refset, set; - int ret, s, tmfd; + int ret, s, tmfd = -1; uint64_t exp; char c; ___ Xenomai-git mailing list Xenomai-git@xenomai.org http://www.xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Jan Kiszka : sysregd: Fix --linger support
Module: xenomai-jki Branch: for-forge Commit: a9f094cae25b985e876496c09ddeab263a04d830 URL: http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=a9f094cae25b985e876496c09ddeab263a04d830 Author: Jan Kiszka Date: Sun Jan 4 14:14:34 2015 +0100 sysregd: Fix --linger support The corresponding option variable was never written, thus --linger had no effect. Fixing this makes the compiler complain about a false-positive uninitialized use of tmfd. Silence that. Signed-off-by: Jan Kiszka --- lib/copperplate/regd/regd.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/copperplate/regd/regd.c b/lib/copperplate/regd/regd.c index 43f763e..780a922 100644 --- a/lib/copperplate/regd/regd.c +++ b/lib/copperplate/regd/regd.c @@ -99,7 +99,7 @@ static const struct option options[] = { #define linger_opt 3 .name = "linger", .has_arg = 0, - .flag = NULL, + .flag = &linger, .val = 1, }, { @@ -273,7 +273,7 @@ static void handle_requests(void) { struct itimerspec its; fd_set refset, set; - int ret, s, tmfd; + int ret, s, tmfd = -1; uint64_t exp; char c; ___ Xenomai-git mailing list Xenomai-git@xenomai.org http://www.xenomai.org/mailman/listinfo/xenomai-git