diff mbox series

[22/23] libsepol: declare file local variable static

Message ID 20210608155912.32047-23-cgzones@googlemail.com (mailing list archive)
State Accepted
Headers show
Series libsepol: miscellaneous cleanup | expand

Commit Message

Christian Göttsche June 8, 2021, 3:59 p.m. UTC
Clang issues:

    module_to_cil.c:65:7: warning: no previous extern declaration for non-static variable 'out_file' [-Wmissing-variable-declarations]
    FILE *out_file;
          ^

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
---
 libsepol/src/module_to_cil.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

James Carter June 21, 2021, 9 p.m. UTC | #1
On Tue, Jun 8, 2021 at 12:02 PM Christian Göttsche
<cgzones@googlemail.com> wrote:
>
> Clang issues:
>
>     module_to_cil.c:65:7: warning: no previous extern declaration for non-static variable 'out_file' [-Wmissing-variable-declarations]
>     FILE *out_file;
>           ^
>
> Signed-off-by: Christian Göttsche <cgzones@googlemail.com>

Acked-by: James Carter <jwcart2@gmail.com>

> ---
>  libsepol/src/module_to_cil.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libsepol/src/module_to_cil.c b/libsepol/src/module_to_cil.c
> index 73ec7971..1d724b91 100644
> --- a/libsepol/src/module_to_cil.c
> +++ b/libsepol/src/module_to_cil.c
> @@ -62,7 +62,7 @@
>  #  define UNUSED(x) UNUSED_ ## x
>  #endif
>
> -FILE *out_file;
> +static FILE *out_file;
>
>  #define STACK_SIZE 16
>  #define DEFAULT_LEVEL "systemlow"
> --
> 2.32.0
>
diff mbox series

Patch

diff --git a/libsepol/src/module_to_cil.c b/libsepol/src/module_to_cil.c
index 73ec7971..1d724b91 100644
--- a/libsepol/src/module_to_cil.c
+++ b/libsepol/src/module_to_cil.c
@@ -62,7 +62,7 @@ 
 #  define UNUSED(x) UNUSED_ ## x
 #endif
 
-FILE *out_file;
+static FILE *out_file;
 
 #define STACK_SIZE 16
 #define DEFAULT_LEVEL "systemlow"