diff mbox series

[uclibc-ng-devel,v2] ldso/dl-vdso: avoid compiler warning if configured without vdso

Message ID 20240709073642.20968-2-marcus.haehnel@kernkonzept.com
State Accepted
Headers show
Series [uclibc-ng-devel,v2] ldso/dl-vdso: avoid compiler warning if configured without vdso | expand

Commit Message

Marcus Haehnel July 9, 2024, 7:36 a.m. UTC
The parameters are not used in the function variant without vdso
support, so tell this to the compiler to avoid a warning. Also fix the
indentation to be in-line with other functions in the file.

Signed-off-by: Marcus Haehnel <marcus.haehnel@kernkonzept.com>
---
 ldso/ldso/dl-vdso.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Comments

Waldemar Brodkorb July 10, 2024, 1:56 p.m. UTC | #1
Hi Marcus,

I applied and pushed all open patches.

Thanks!
 best regards
  Waldemar

Marcus Haehnel wrote,

> The parameters are not used in the function variant without vdso
> support, so tell this to the compiler to avoid a warning. Also fix the
> indentation to be in-line with other functions in the file.
> 
> Signed-off-by: Marcus Haehnel <marcus.haehnel@kernkonzept.com>
> ---
>  ldso/ldso/dl-vdso.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/ldso/ldso/dl-vdso.c b/ldso/ldso/dl-vdso.c
> index 196cbbb3b..01309011d 100755
> --- a/ldso/ldso/dl-vdso.c
> +++ b/ldso/ldso/dl-vdso.c
> @@ -28,14 +28,14 @@
>  
>  
>  #ifndef __VDSO_SUPPORT__
> -    void load_vdso(void *sys_info_ehdr, char **envp ){
> +void load_vdso( void *sys_info_ehdr attribute_unused,
> +                char **envp attribute_unused ){
>  #ifdef __SUPPORT_LD_DEBUG__
> -        if ( _dl_debug_vdso != 0 ){
> -            _dl_dprintf(2,"_dl_vdso support not enabled\n" );
> -        }
> -
> -#endif
> +    if ( _dl_debug_vdso != 0 ){
> +        _dl_dprintf(2,"_dl_vdso support not enabled\n" );
>      }
> +#endif
> +}
>  #else
>  
>  void *_dl__vdso_gettimeofday  = 0;
> -- 
> 2.45.2
> 
> _______________________________________________
> devel mailing list -- devel@uclibc-ng.org
> To unsubscribe send an email to devel-leave@uclibc-ng.org
>
diff mbox series

Patch

diff --git a/ldso/ldso/dl-vdso.c b/ldso/ldso/dl-vdso.c
index 196cbbb3b..01309011d 100755
--- a/ldso/ldso/dl-vdso.c
+++ b/ldso/ldso/dl-vdso.c
@@ -28,14 +28,14 @@ 
 
 
 #ifndef __VDSO_SUPPORT__
-    void load_vdso(void *sys_info_ehdr, char **envp ){
+void load_vdso( void *sys_info_ehdr attribute_unused,
+                char **envp attribute_unused ){
 #ifdef __SUPPORT_LD_DEBUG__
-        if ( _dl_debug_vdso != 0 ){
-            _dl_dprintf(2,"_dl_vdso support not enabled\n" );
-        }
-
-#endif
+    if ( _dl_debug_vdso != 0 ){
+        _dl_dprintf(2,"_dl_vdso support not enabled\n" );
     }
+#endif
+}
 #else
 
 void *_dl__vdso_gettimeofday  = 0;