diff mbox series

libxl/disk: avoid aliasing of abs()

Message ID ad3b9873-b478-4448-8395-498399040324@suse.com (mailing list archive)
State New
Headers show
Series libxl/disk: avoid aliasing of abs() | expand

Commit Message

Jan Beulich Aug. 6, 2024, 8:40 a.m. UTC
Tool chains with -Wshadow enabled by default won't like the function
parameter name "abs", for aliasing stdlib.h's abs(). Rename the
parameter to what other similar functions use.

Fixes: a18b50614d97 ("libxl: Enable stubdom cdrom changing")
Signed-off-by: Jan Beulich <jbeulich@suse.com>

Comments

Jürgen Groß Aug. 6, 2024, 10:29 a.m. UTC | #1
On 06.08.24 10:40, Jan Beulich wrote:
> Tool chains with -Wshadow enabled by default won't like the function
> parameter name "abs", for aliasing stdlib.h's abs(). Rename the
> parameter to what other similar functions use.
> 
> Fixes: a18b50614d97 ("libxl: Enable stubdom cdrom changing")
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Reviewed-by: Juergen Gross <jgross@suse.com>


Juergen
Stefano Stabellini Aug. 6, 2024, 5:43 p.m. UTC | #2
On Tue, 5 Aug 2024, Jan Beulich wrote:
> Tool chains with -Wshadow enabled by default won't like the function
> parameter name "abs", for aliasing stdlib.h's abs(). Rename the
> parameter to what other similar functions use.
> 
> Fixes: a18b50614d97 ("libxl: Enable stubdom cdrom changing")
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>


> --- a/tools/libs/light/libxl_disk.c
> +++ b/tools/libs/light/libxl_disk.c
> @@ -935,7 +935,7 @@ static void cdrom_insert_stubdom_disk_ad
>                                               libxl__ao_device *aodev);
>  static void cdrom_insert_stubdom_query_fdset(libxl__egc *egc,
>                                               libxl__ev_time *ev,
> -                                             const struct timeval *abs,
> +                                             const struct timeval *requested_abs,
>                                               int rc);
>  static void cdrom_insert_stubdom_parse_fdset(libxl__egc *egc,
>                                               libxl__ev_qmp *qmp,
> @@ -1259,7 +1259,7 @@ static void cdrom_insert_stubdom_disk_ad
>  
>  static void cdrom_insert_stubdom_query_fdset(libxl__egc *egc,
>                                               libxl__ev_time *ev,
> -                                             const struct timeval *abs,
> +                                             const struct timeval *requested_abs,
>                                               int rc)
>  {
>      EGC_GC;
>
Jason Andryuk Aug. 7, 2024, 1:40 p.m. UTC | #3
On 2024-08-06 04:40, Jan Beulich wrote:
> Tool chains with -Wshadow enabled by default won't like the function
> parameter name "abs", for aliasing stdlib.h's abs(). Rename the
> parameter to what other similar functions use.
> 
> Fixes: a18b50614d97 ("libxl: Enable stubdom cdrom changing")
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Reviewed-by: Jason Andryuk <jason.andryuk@amd.com>

Thanks,
Jason
Anthony PERARD Aug. 13, 2024, 4:58 p.m. UTC | #4
On Tue, Aug 06, 2024 at 10:40:14AM +0200, Jan Beulich wrote:
> Tool chains with -Wshadow enabled by default won't like the function
> parameter name "abs", for aliasing stdlib.h's abs(). Rename the
> parameter to what other similar functions use.
> 
> Fixes: a18b50614d97 ("libxl: Enable stubdom cdrom changing")
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Acked-by: Anthony PERARD <anthony.perard@vates.tech>

Thanks,
diff mbox series

Patch

--- a/tools/libs/light/libxl_disk.c
+++ b/tools/libs/light/libxl_disk.c
@@ -935,7 +935,7 @@  static void cdrom_insert_stubdom_disk_ad
                                              libxl__ao_device *aodev);
 static void cdrom_insert_stubdom_query_fdset(libxl__egc *egc,
                                              libxl__ev_time *ev,
-                                             const struct timeval *abs,
+                                             const struct timeval *requested_abs,
                                              int rc);
 static void cdrom_insert_stubdom_parse_fdset(libxl__egc *egc,
                                              libxl__ev_qmp *qmp,
@@ -1259,7 +1259,7 @@  static void cdrom_insert_stubdom_disk_ad
 
 static void cdrom_insert_stubdom_query_fdset(libxl__egc *egc,
                                              libxl__ev_time *ev,
-                                             const struct timeval *abs,
+                                             const struct timeval *requested_abs,
                                              int rc)
 {
     EGC_GC;