Re: [libvirt] [PATCH] remote: Fix the build by explicitly casting the obj pointer for xdr_free

2018-12-14 Thread Daniel P . Berrangé
On Fri, Dec 14, 2018 at 12:08:55PM +0100, Erik Skultety wrote:
> On Fri, Dec 14, 2018 at 10:11:55AM +, Daniel P. Berrangé wrote:
> > On Fri, Dec 14, 2018 at 10:18:39AM +0100, Erik Skultety wrote:
> > > For some reason, xdr_free uses char * instead of void * for its 2nd
> > > argument which is passed to a custom free routine. Commit
> > > dc54b3ec missed this detail which made the build fail on a number of
> > > platforms. Fix it by explicitly casting the object pointer to char *
> > > just like we do in other places throughout the code base.
> >
> > Which platforms did you see this on ?
> >
> > On Linux  libtirpc declares it correctly
> >
> >   extern void xdr_free(xdrproc_t, void *);
> 
> Oh, then it's just the man-pages package on Fedora 29 which still reports the
> wrong signature. Anyhow, CI reported the issue on Debian 8-9 and Centos7.

Oh this is a difference with the original in-glibc impl which does indeed
use char *.  


Regards,
Daniel
-- 
|: https://berrange.com  -o-https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o-https://fstop138.berrange.com :|
|: https://entangle-photo.org-o-https://www.instagram.com/dberrange :|

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH] remote: Fix the build by explicitly casting the obj pointer for xdr_free

2018-12-14 Thread Erik Skultety
On Fri, Dec 14, 2018 at 10:11:55AM +, Daniel P. Berrangé wrote:
> On Fri, Dec 14, 2018 at 10:18:39AM +0100, Erik Skultety wrote:
> > For some reason, xdr_free uses char * instead of void * for its 2nd
> > argument which is passed to a custom free routine. Commit
> > dc54b3ec missed this detail which made the build fail on a number of
> > platforms. Fix it by explicitly casting the object pointer to char *
> > just like we do in other places throughout the code base.
>
> Which platforms did you see this on ?
>
> On Linux  libtirpc declares it correctly
>
>   extern void xdr_free(xdrproc_t, void *);

Oh, then it's just the man-pages package on Fedora 29 which still reports the
wrong signature. Anyhow, CI reported the issue on Debian 8-9 and Centos7.

Erik

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH] remote: Fix the build by explicitly casting the obj pointer for xdr_free

2018-12-14 Thread Daniel P . Berrangé
On Fri, Dec 14, 2018 at 10:18:39AM +0100, Erik Skultety wrote:
> For some reason, xdr_free uses char * instead of void * for its 2nd
> argument which is passed to a custom free routine. Commit
> dc54b3ec missed this detail which made the build fail on a number of
> platforms. Fix it by explicitly casting the object pointer to char *
> just like we do in other places throughout the code base.

Which platforms did you see this on ?

On Linux  libtirpc declares it correctly

  extern void xdr_free(xdrproc_t, void *);


> 
> Signed-off-by: Erik Skultety 
> ---
> 
> Pushed under the build breaker rule.
> 
>  src/remote/remote_daemon_dispatch.c | 66 ++---
>  1 file changed, 33 insertions(+), 33 deletions(-)
> 
> diff --git a/src/remote/remote_daemon_dispatch.c 
> b/src/remote/remote_daemon_dispatch.c
> index c087197634..51bc055564 100644
> --- a/src/remote/remote_daemon_dispatch.c
> +++ b/src/remote/remote_daemon_dispatch.c
> @@ -337,7 +337,7 @@ remoteRelayDomainEventLifecycle(virConnectPtr conn,
> 
>   error:
>  xdr_free((xdrproc_t)xdr_remote_domain_event_lifecycle_msg,
> - );
> + (char *) );
>  return -1;
>  }
> 
> @@ -378,7 +378,7 @@ remoteRelayDomainEventReboot(virConnectPtr conn,
> 
>   error:
>  xdr_free((xdrproc_t)xdr_remote_domain_event_reboot_msg,
> - );
> + (char *) );
>  return -1;
>  }
> 
> @@ -423,7 +423,7 @@ remoteRelayDomainEventRTCChange(virConnectPtr conn,
> 
>   error:
>  xdr_free((xdrproc_t)xdr_remote_domain_event_rtc_change_msg,
> - );
> + (char *) );
>  return -1;
>  }
> 
> @@ -467,7 +467,7 @@ remoteRelayDomainEventWatchdog(virConnectPtr conn,
> 
>   error:
>  xdr_free((xdrproc_t)xdr_remote_domain_event_watchdog_msg,
> - );
> + (char *) );
>  return -1;
>  }
> 
> @@ -516,7 +516,7 @@ remoteRelayDomainEventIOError(virConnectPtr conn,
>  return 0;
>   error:
>  xdr_free((xdrproc_t)xdr_remote_domain_event_io_error_msg,
> - );
> + (char *) );
>  return -1;
>  }
> 
> @@ -569,7 +569,7 @@ remoteRelayDomainEventIOErrorReason(virConnectPtr conn,
> 
>   error:
>  xdr_free((xdrproc_t)xdr_remote_domain_event_io_error_reason_msg,
> - );
> + (char *) );
>  return -1;
>  }
> 
> @@ -643,7 +643,7 @@ remoteRelayDomainEventGraphics(virConnectPtr conn,
> 
>   error:
>  xdr_free((xdrproc_t)xdr_remote_domain_event_graphics_msg,
> - );
> + (char *) );
>  return -1;
>  }
> 
> @@ -691,7 +691,7 @@ remoteRelayDomainEventBlockJob(virConnectPtr conn,
> 
>   error:
>  xdr_free((xdrproc_t)xdr_remote_domain_event_block_job_msg,
> - );
> + (char *) );
>  return -1;
>  }
> 
> @@ -733,7 +733,7 @@ remoteRelayDomainEventControlError(virConnectPtr conn,
> 
>   error:
>  xdr_free((xdrproc_t)xdr_remote_domain_event_control_error_msg,
> - );
> + (char *) );
>  return -1;
>  }
> 
> @@ -797,7 +797,7 @@ remoteRelayDomainEventDiskChange(virConnectPtr conn,
> 
>   error:
>  xdr_free((xdrproc_t)xdr_remote_domain_event_disk_change_msg,
> - );
> + (char *) );
>  return -1;
>  }
> 
> @@ -846,7 +846,7 @@ remoteRelayDomainEventTrayChange(virConnectPtr conn,
> 
>   error:
>  xdr_free((xdrproc_t)xdr_remote_domain_event_tray_change_msg,
> - );
> + (char *) );
>  return -1;
>  }
> 
> @@ -888,7 +888,7 @@ remoteRelayDomainEventPMWakeup(virConnectPtr conn,
> 
>   error:
>  xdr_free((xdrproc_t)xdr_remote_domain_event_pmwakeup_msg,
> - );
> + (char *) );
>  return -1;
>  }
> 
> @@ -930,7 +930,7 @@ remoteRelayDomainEventPMSuspend(virConnectPtr conn,
> 
>   error:
>  xdr_free((xdrproc_t)xdr_remote_domain_event_pmsuspend_msg,
> - );
> + (char *) );
>  return -1;
>  }
> 
> @@ -973,7 +973,7 @@ remoteRelayDomainEventBalloonChange(virConnectPtr conn,
> 
>   error:
>  xdr_free((xdrproc_t)xdr_remote_domain_event_balloon_change_msg,
> - );
> + (char *) );
>  return -1;
>  }
> 
> @@ -1016,7 +1016,7 @@ remoteRelayDomainEventPMSuspendDisk(virConnectPtr conn,
> 
>   error:
>  xdr_free((xdrproc_t)xdr_remote_domain_event_pmsuspend_disk_msg,
> - );
> + (char *) );
>  return -1;
>  }
> 
> @@ -1064,7 +1064,7 @@ remoteRelayDomainEventDeviceRemoved(virConnectPtr conn,
> 
>   error:
>  xdr_free((xdrproc_t)xdr_remote_domain_event_device_removed_msg,
> - );
> + (char *) );
>  return -1;
>  }
> 
> @@ -1105,7 +1105,7 @@ remoteRelayDomainEventBlockJob2(virConnectPtr conn,
> 
>   error:
>  xdr_free((xdrproc_t)xdr_remote_domain_event_block_job_2_msg,
> - );
> + (char *) );
>  return -1;
>  }
> 
> @@ -1150,7 +1150,7 @@ remoteRelayDomainEventTunable(virConnectPtr conn,
> 
>   error:
>