diff mbox series

configure: fix pam test warning

Message ID 20190404091725.20595-1-dgilbert@redhat.com (mailing list archive)
State New, archived
Headers show
Series configure: fix pam test warning | expand

Commit Message

Dr. David Alan Gilbert April 4, 2019, 9:17 a.m. UTC
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>

The pam test generates a warning on Fedora 29 with -O3 compilation
because the headers declare that the pam_conversation pointer to
pam_start must be non-NULL.  Change it to use the same 0 initialised
structure as we actually use in qauthz.

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
 configure | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Daniel P. Berrangé April 4, 2019, 9:19 a.m. UTC | #1
CC trivial

On Thu, Apr 04, 2019 at 10:17:25AM +0100, Dr. David Alan Gilbert (git) wrote:
> From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
> 
> The pam test generates a warning on Fedora 29 with -O3 compilation
> because the headers declare that the pam_conversation pointer to
> pam_start must be non-NULL.  Change it to use the same 0 initialised
> structure as we actually use in qauthz.
> 
> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> ---
>  configure | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Acked-by: Daniel P. Berrangé <berrange@redhat.com>

> 
> diff --git a/configure b/configure
> index 1c563a7027..73f7ad2be0 100755
> --- a/configure
> +++ b/configure
> @@ -2946,9 +2946,9 @@ if test "$auth_pam" != "no"; then
>  int main(void) {
>     const char *service_name = "qemu";
>     const char *user = "frank";
> -   const struct pam_conv *pam_conv = NULL;
> +   const struct pam_conv pam_conv = { 0 };
>     pam_handle_t *pamh = NULL;
> -   pam_start(service_name, user, pam_conv, &pamh);
> +   pam_start(service_name, user, &pam_conv, &pamh);
>     return 0;
>  }
>  EOF

Regards,
Daniel
Philippe Mathieu-Daudé April 4, 2019, 1:55 p.m. UTC | #2
On 4/4/19 11:17 AM, Dr. David Alan Gilbert (git) wrote:
> From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
> 
> The pam test generates a warning on Fedora 29 with -O3 compilation
> because the headers declare that the pam_conversation pointer to
> pam_start must be non-NULL.  Change it to use the same 0 initialised
> structure as we actually use in qauthz.
> 
> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

> ---
>  configure | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/configure b/configure
> index 1c563a7027..73f7ad2be0 100755
> --- a/configure
> +++ b/configure
> @@ -2946,9 +2946,9 @@ if test "$auth_pam" != "no"; then
>  int main(void) {
>     const char *service_name = "qemu";
>     const char *user = "frank";
> -   const struct pam_conv *pam_conv = NULL;
> +   const struct pam_conv pam_conv = { 0 };
>     pam_handle_t *pamh = NULL;
> -   pam_start(service_name, user, pam_conv, &pamh);
> +   pam_start(service_name, user, &pam_conv, &pamh);
>     return 0;
>  }
>  EOF
>
Laurent Vivier April 11, 2019, 8:03 p.m. UTC | #3
On 04/04/2019 11:19, Daniel P. Berrangé wrote:
> CC trivial
> 
> On Thu, Apr 04, 2019 at 10:17:25AM +0100, Dr. David Alan Gilbert (git) wrote:
>> From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
>>
>> The pam test generates a warning on Fedora 29 with -O3 compilation
>> because the headers declare that the pam_conversation pointer to
>> pam_start must be non-NULL.  Change it to use the same 0 initialised
>> structure as we actually use in qauthz.
>>
>> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
>> ---
>>  configure | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> Acked-by: Daniel P. Berrangé <berrange@redhat.com>
> 
>>
>> diff --git a/configure b/configure
>> index 1c563a7027..73f7ad2be0 100755
>> --- a/configure
>> +++ b/configure
>> @@ -2946,9 +2946,9 @@ if test "$auth_pam" != "no"; then
>>  int main(void) {
>>     const char *service_name = "qemu";
>>     const char *user = "frank";
>> -   const struct pam_conv *pam_conv = NULL;
>> +   const struct pam_conv pam_conv = { 0 };
>>     pam_handle_t *pamh = NULL;
>> -   pam_start(service_name, user, pam_conv, &pamh);
>> +   pam_start(service_name, user, &pam_conv, &pamh);
>>     return 0;
>>  }
>>  EOF
> 
> Regards,
> Daniel
> 

Applied to my trivial-patches branch.

Thanks,
Laurent
diff mbox series

Patch

diff --git a/configure b/configure
index 1c563a7027..73f7ad2be0 100755
--- a/configure
+++ b/configure
@@ -2946,9 +2946,9 @@  if test "$auth_pam" != "no"; then
 int main(void) {
    const char *service_name = "qemu";
    const char *user = "frank";
-   const struct pam_conv *pam_conv = NULL;
+   const struct pam_conv pam_conv = { 0 };
    pam_handle_t *pamh = NULL;
-   pam_start(service_name, user, pam_conv, &pamh);
+   pam_start(service_name, user, &pam_conv, &pamh);
    return 0;
 }
 EOF