On Fri, Dec 23, 2016 at 4:19 PM, Guido Trentalancia <gu...@trentalancia.net>
wrote:

> Fix compile errors when using the "-O -Werror" flags on gcc6.
>
> Signed-off-by: Guido Trentalancia <gu...@trentalancia.net>
> ---
>  src/direct_api.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff -pru libsemanage-2.6-orig/src/direct_api.c
> libsemanage-2.6/src/direct_api.c
> --- libsemanage-2.6-orig/src/direct_api.c       2016-10-14
> 17:31:26.000000000 +0200
> +++ libsemanage-2.6/src/direct_api.c    2016-12-23 15:22:50.101297993
> +0100
> @@ -955,8 +955,8 @@ static int semanage_compile_module(seman
>         ssize_t bzip_status;
>         int status = 0;
>         int compressed;
> -       size_t cil_data_len;
> -       size_t err_data_len;
> +       size_t cil_data_len = 0;
> +       size_t err_data_len = 0;
>
>         if (!strcasecmp(modinfo->lang_ext, "cil")) {
>                 goto cleanup;
>

Hello,
>From a package maintainer perspective (ie. someone who reads the git log in
order to find patchs which need to be backported), it would be nice if the
patch description would state whether this fixes a real error which went
undetected in the previous releases, or whether this silents a
false-positive warning from the compiler.
In this case, gcc is having hard time to find out whether
semanage_pipe_data() initializes *out_data_len and *err_data_len parameters
when this function is called by semanage_compile_module(). So it seems to
be a false-positive. If you confirm this analysis and send a second
revision, could you please add this information to the description?

Cheers,
Nicolas
_______________________________________________
Selinux mailing list
Selinux@tycho.nsa.gov
To unsubscribe, send email to selinux-le...@tycho.nsa.gov.
To get help, send an email containing "help" to selinux-requ...@tycho.nsa.gov.

Reply via email to