Re: [PATCH] src: drop some forward declarations in src/storage/storage_backend_sheepdog.c

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

 



On Sat, Mar 27, 2021 at 10:54:39 +0800, peili wrote:
> ---
>  src/storage/storage_backend_sheepdog.c | 6 ------
>  1 file changed, 6 deletions(-)
> 
> diff --git a/src/storage/storage_backend_sheepdog.c b/src/storage/storage_backend_sheepdog.c
> index 8c37947308..010e86aa14 100644
> --- a/src/storage/storage_backend_sheepdog.c
> +++ b/src/storage/storage_backend_sheepdog.c
> @@ -35,12 +35,6 @@
>  
>  #define VIR_FROM_THIS VIR_FROM_STORAGE
>  
> -static int virStorageBackendSheepdogRefreshVol(virStoragePoolObjPtr pool,
> -                                               virStorageVolDefPtr vol);
> -
> -void virStorageBackendSheepdogAddHostArg(virCommandPtr cmd,
> -                                         virStoragePoolObjPtr pool);
> -
>  int
>  virStorageBackendSheepdogParseNodeInfo(virStoragePoolDefPtr pool,
>                                         char *output)

Fails to compile:

../../../libvirt/src/storage/storage_backend_sheepdog.c:86:1: error: no previous prototype for ‘virStorageBackendSheepdogAddHostArg’ [-Werror=missing-prototypes]
   86 | virStorageBackendSheepdogAddHostArg(virCommandPtr cmd,
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../libvirt/src/storage/storage_backend_sheepdog.c: In function ‘virStorageBackendSheepdogAddVolume’:
../../../libvirt/src/storage/storage_backend_sheepdog.c:121:9: error: implicit declaration of function ‘virStorageBackendSheepdogRefreshVol’; did you mean ‘virStorageBackendSheepdogRegister’? [-Werror=implicit-function-declaration]
  121 |     if (virStorageBackendSheepdogRefreshVol(pool, vol) < 0)
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |         virStorageBackendSheepdogRegister
../../../libvirt/src/storage/storage_backend_sheepdog.c:121:9: error: nested extern declaration of ‘virStorageBackendSheepdogRefreshVol’ [-Werror=nested-externs]
../../../libvirt/src/storage/storage_backend_sheepdog.c: At top level:
../../../libvirt/src/storage/storage_backend_sheepdog.c:308:1: error: static declaration of ‘virStorageBackendSheepdogRefreshVol’ follows non-static declaration
  308 | virStorageBackendSheepdogRefreshVol(virStoragePoolObjPtr pool,
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../libvirt/src/storage/storage_backend_sheepdog.c:121:9: note: previous implicit declaration of ‘virStorageBackendSheepdogRefreshVol’ was here
  121 |     if (virStorageBackendSheepdogRefreshVol(pool, vol) < 0)
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


NACK, the patch doesn't justify this by any means and it's breaking
build.




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux