[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 17/18] i386/i386at/kd_event.c: fix difference in signedness
From: |
Samuel Thibault |
Subject: |
Re: [PATCH 17/18] i386/i386at/kd_event.c: fix difference in signedness |
Date: |
Mon, 9 Dec 2013 00:40:12 +0900 |
User-agent: |
Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30) |
Marin Ramesa, le Fri 06 Dec 2013 16:29:59 +0100, a écrit :
> * i386/i386at/kd_event.c (X_kdb_enter_init, X_kdb_exit_init): Modify argument
> type.
> memcpy() has a pointer to void as a second argument so it's all the same.
> * i386/i386at/kd_event.h (X_kdb_enter_init, X_kdb_exit_init): Modify argument
> type.
It should rather be the caller to cast its data.
> ---
> i386/i386at/kd_event.c | 4 ++--
> i386/i386at/kd_event.h | 4 ++--
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/i386/i386at/kd_event.c b/i386/i386at/kd_event.c
> index 425afb1..bf33110 100644
> --- a/i386/i386at/kd_event.c
> +++ b/i386/i386at/kd_event.c
> @@ -367,7 +367,7 @@ X_kdb_exit()
>
> io_return_t
> X_kdb_enter_init(data, count)
> - u_int *data;
> + int *data;
> u_int count;
> {
> if (count * sizeof X_kdb_enter_str[0] > sizeof X_kdb_enter_str)
> @@ -380,7 +380,7 @@ X_kdb_enter_init(data, count)
>
> io_return_t
> X_kdb_exit_init(data, count)
> - u_int *data;
> + int *data;
> u_int count;
> {
> if (count * sizeof X_kdb_exit_str[0] > sizeof X_kdb_exit_str)
> diff --git a/i386/i386at/kd_event.h b/i386/i386at/kd_event.h
> index 5298567..f50a881 100644
> --- a/i386/i386at/kd_event.h
> +++ b/i386/i386at/kd_event.h
> @@ -50,8 +50,8 @@ extern void kd_enqsc(Scancode sc);
>
> void kbd_enqueue(kd_event *ev);
>
> -io_return_t X_kdb_enter_init(u_int *data, u_int count);
> -io_return_t X_kdb_exit_init(u_int *data, u_int count);
> +io_return_t X_kdb_enter_init(int *data, u_int count);
> +io_return_t X_kdb_exit_init(int *data, u_int count);
>
> boolean_t kbd_read_done(io_req_t ior);
>
> --
> 1.8.1.4
>
>
--
Samuel
> et sinon, quand on s'interesse a un media que l'on ne maitrise pas,
> on essaye de le comprendre d'abord.
(Suivi par l'intégralité du message initial de 45 lignes.)
-+-BM in : GNU - La maîtrise est un long apprentissage petit scarabé -+-
- Re: [PATCH 12/18] kern/debug.c: fix implicit declaration of function, (continued)
- [PATCH 11/18] kern/exception.c: move struct definition to a header file, Marin Ramesa, 2013/12/06
- [PATCH 14/18] Fix initialization from incompatible pointer type, Marin Ramesa, 2013/12/06
- [PATCH 13/18] kern/machine.c: fix implicit declaration of function, Marin Ramesa, 2013/12/06
- [PATCH 15/18] i386/i386at/com.c: fix initialization from incompatible pointer type, Marin Ramesa, 2013/12/06
- [PATCH 16/18] i386/i386at/com.c: fix assignment from incompatible pointer type, Marin Ramesa, 2013/12/06
- [PATCH 17/18] i386/i386at/kd_event.c: fix difference in signedness, Marin Ramesa, 2013/12/06
- Re: [PATCH 17/18] i386/i386at/kd_event.c: fix difference in signedness,
Samuel Thibault <=
- [PATCH 18/18] i386/i386at/lpr.c: fix initalization from incompatible pointer type, Marin Ramesa, 2013/12/06