Re: [PATCH 1/1] libselinux: audit2why: remove unused module_state structure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/17/2016 04:43 PM, Nicolas Iooss wrote:
> This structure has been empty since its introduction and makes clang
> complain when $(filter-out -Werror, $(CFLAGS)) is removed in the
> Makefile target for audit2why.lo:
> 
>     audit2why.c:443:1: error: empty struct has size 0 in C, size 1 in
>     C++ [-Werror,-Wc++-compat]
>       struct module_state {
>       ^
>       1 error generated.
> 
> Signed-off-by: Nicolas Iooss <nicolas.iooss@xxxxxxx>

Thanks, applied.

> ---
>  libselinux/src/audit2why.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/libselinux/src/audit2why.c b/libselinux/src/audit2why.c
> index abe1701616fc..3d312a10a589 100644
> --- a/libselinux/src/audit2why.c
> +++ b/libselinux/src/audit2why.c
> @@ -440,14 +440,11 @@ static PyMethodDef audit2whyMethods[] = {
>  
>  #if PY_MAJOR_VERSION >= 3
>  /* Module-initialization logic specific to Python 3 */
> -struct module_state {
> -	/* empty for now */
> -};
>  static struct PyModuleDef moduledef = {
>  	PyModuleDef_HEAD_INIT,
>  	"audit2why",
>  	NULL,
> -	sizeof(struct module_state),
> +	0,
>  	audit2whyMethods,
>  	NULL,
>  	NULL,
> 

_______________________________________________
Selinux mailing list
Selinux@xxxxxxxxxxxxx
To unsubscribe, send email to Selinux-leave@xxxxxxxxxxxxx.
To get help, send an email containing "help" to Selinux-request@xxxxxxxxxxxxx.



[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux