[libblockdev 1/4] Do not add some redundant const modifiers.

Vratislav Podzimek vpodzime at redhat.com
Thu Jul 10 07:12:29 UTC 2014


On Wed, 2014-07-09 at 12:16 -0400, mulhern wrote:
> The part of the type they modify is always constant anyway, which leads
> to a compiler warning.
> 
> Signed-off-by: mulhern <amulhern at redhat.com>
> ---
>  boilerplate_generator.py | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/boilerplate_generator.py b/boilerplate_generator.py
> index 7270dea..2459926 100755
> --- a/boilerplate_generator.py
> +++ b/boilerplate_generator.py
> @@ -128,12 +128,12 @@ def get_funcs_info(fn_infos, module_name):
>          ret += '    "{0.name}",\n'.format(info)
>      ret += "    NULL};\n\n"
>  
> -    ret += ("gchar const * const * const get_{0}_functions (void) {{\n".format(module_name) +
> +    ret += ("gchar const * const * get_{0}_functions (void) {{\n".format(module_name) +
>              "    return {0}_functions;\n".format(module_name) +
>              "}\n\n")
>  
>      ret += "const guint8 {0}_num_functions = {1};\n\n".format(module_name, len(fn_infos))
> -    ret += ("const guint8 get_{0}_num_functions (void) {{\n".format(module_name) +
> +    ret += ("guint8 get_{0}_num_functions (void) {{\n".format(module_name) +
>              "    return {0}_num_functions;\n".format(module_name) +
>              "}\n\n")
This is already fixed.

-- 
Vratislav Podzimek

Anaconda Rider | RHCE | Red Hat, Inc. | Brno - Czech Republic




More information about the anaconda-patches mailing list