Re: [PATCH v2 18/20] virlog: Make some of the methods static

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

 




On 08/18/2016 07:47 AM, Erik Skultety wrote:
> Several methods that were introduced in previous patches were not made static
> on purpose so they could be introduced without any occurrence without the
> compiler complaining about not using them. Since the scope of the methods is
> local to the virlog module only, they can now be turned to static.
> 
> Signed-off-by: Erik Skultety <eskultet@xxxxxxxxxx>
> ---
>  src/libvirt_private.syms |  6 ------
>  src/util/virlog.c        | 12 ++++++------
>  src/util/virlog.h        |  8 --------
>  3 files changed, 6 insertions(+), 20 deletions(-)
> 

See my followup to patch 9.  Using ATTRIBUTE_UNUSED will remove the need
for this patch.

John
> diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
> index 58d0d7e..6dd90ea 100644
> --- a/src/libvirt_private.syms
> +++ b/src/libvirt_private.syms
> @@ -1855,17 +1855,11 @@ virLogGetNbOutputs;
>  virLogGetOutputs;
>  virLogLock;
>  virLogMessage;
> -virLogNewOutputToFile;
> -virLogNewOutputToJournald;
> -virLogNewOutputToStderr;
> -virLogNewOutputToSyslog;
>  virLogOutputFree;
>  virLogOutputListFree;
>  virLogOutputNew;
>  virLogParseDefaultPriority;
> -virLogParseFilter;
>  virLogParseFilters;
> -virLogParseOutput;
>  virLogParseOutputs;
>  virLogPriorityFromSyslog;
>  virLogProbablyLogMessage;
> diff --git a/src/util/virlog.c b/src/util/virlog.c
> index 12e6d94..34209d0 100644
> --- a/src/util/virlog.c
> +++ b/src/util/virlog.c
> @@ -639,7 +639,7 @@ virLogCloseFd(void *data)
>  }
>  
>  
> -virLogOutputPtr
> +static virLogOutputPtr
>  virLogNewOutputToStderr(virLogPriority priority)
>  {
>      return virLogOutputNew(virLogOutputToFd, NULL, (void *)2L, priority,
> @@ -647,7 +647,7 @@ virLogNewOutputToStderr(virLogPriority priority)
>  }
>  
>  
> -virLogOutputPtr
> +static virLogOutputPtr
>  virLogNewOutputToFile(virLogPriority priority,
>                        const char *file)
>  {
> @@ -733,7 +733,7 @@ virLogCloseSyslog(void *data ATTRIBUTE_UNUSED)
>  }
>  
>  
> -virLogOutputPtr
> +static virLogOutputPtr
>  virLogNewOutputToSyslog(virLogPriority priority,
>                          const char *ident)
>  {
> @@ -980,7 +980,7 @@ static void virLogCloseJournald(void *data ATTRIBUTE_UNUSED)
>  }
>  
>  
> -virLogOutputPtr
> +static virLogOutputPtr
>  virLogNewOutputToJournald(int priority)
>  {
>      virLogOutputPtr ret = NULL;
> @@ -1424,7 +1424,7 @@ virLogDefineFilters(virLogFilterPtr *filters, size_t nfilters)
>      return virLogNbFilters;
>  }
>  
> -virLogOutputPtr
> +static virLogOutputPtr
>  virLogParseOutput(const char *src)
>  {
>      virLogOutputPtr ret = NULL;
> @@ -1495,7 +1495,7 @@ virLogParseOutput(const char *src)
>      return ret;
>  }
>  
> -virLogFilterPtr
> +static virLogFilterPtr
>  virLogParseFilter(const char *filter)
>  {
>      virLogFilterPtr ret = NULL;
> diff --git a/src/util/virlog.h b/src/util/virlog.h
> index 6f5af2c..877e0f7 100644
> --- a/src/util/virlog.h
> +++ b/src/util/virlog.h
> @@ -229,14 +229,6 @@ int virLogFindOutput(virLogOutputPtr *outputs, size_t noutputs,
>                       virLogDestination dest, const void *opaque);
>  int virLogDefineOutputs(virLogOutputPtr *outputs, size_t noutputs);
>  int virLogDefineFilters(virLogFilterPtr *filters, size_t nfilters);
> -virLogOutputPtr virLogNewOutputToStderr(virLogPriority priority);
> -virLogOutputPtr virLogNewOutputToFile(virLogPriority priority,
> -                                      const char *file);
> -virLogOutputPtr virLogNewOutputToSyslog(virLogPriority priority,
> -                                        const char *ident);
> -virLogOutputPtr virLogNewOutputToJournald(int priority);
> -virLogOutputPtr virLogParseOutput(const char *src);
> -virLogFilterPtr virLogParseFilter(const char *src);
>  int virLogParseOutputs(const char *src, virLogOutputPtr **outputs);
>  int virLogParseFilters(const char *src, virLogFilterPtr **filters);
>  
> 

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



[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]