[Pdbg] [PATCH 5/6] libpdbg: Fix clang warning -Wunused-function

Alistair Popple alistair at popple.id.au
Tue Jul 2 11:47:05 AEST 2019


No idea if we will ever need this or not but looks good for now.

Reviewed-by: Alistair Popple <alistair at popple.id.au>

On Wednesday, 19 June 2019 1:15:49 PM AEST Amitay Isaacs wrote:
> Signed-off-by: Amitay Isaacs <amitay at ozlabs.org>
> ---
>  libpdbg/device.c | 15 ---------------
>  1 file changed, 15 deletions(-)
> 
> diff --git a/libpdbg/device.c b/libpdbg/device.c
> index b71170c..6b5b57c 100644
> --- a/libpdbg/device.c
> +++ b/libpdbg/device.c
> @@ -64,12 +64,6 @@ static const char *take_name(const char *name)
>  	return name;
>  }
> 
> -static void free_name(const char *name)
> -{
> -	if (!is_rodata(name))
> -		free((char *)name);
> -}
> -
>  static struct pdbg_target *dt_new_node(const char *name, const void *fdt,
> int node_offset) {
>  	const struct hw_unit_info *hw_info = NULL;
> @@ -195,15 +189,6 @@ static bool dt_attach_root(struct pdbg_target *parent,
> struct pdbg_target *root) return true;
>  }
> 
> -static inline void dt_destroy(struct pdbg_target *dn)
> -{
> -	if (!dn)
> -		return;
> -
> -	free_name(dn->dn_name);
> -	free(dn);
> -}
> -
>  static char *dt_get_path(const struct pdbg_target *node)
>  {
>  	unsigned int len = 0;




More information about the Pdbg mailing list