[PATCH wayland] (multiple): Include stdint.h

Eric Engestrom eric.engestrom at imgtec.com
Tue Jul 19 09:21:57 UTC 2016


On Mon, Jul 18, 2016 at 12:42:25PM -0500, Yong Bakos wrote:
> From: Yong Bakos <ybakos at humanoriented.com>
> 
> Some headers and source files have been using types such as uint32_t
> without explicitly including stdint.h.
> 
> Explicitly include stdint.h where appropriate.
> 
> Signed-off-by: Yong Bakos <ybakos at humanoriented.com>

Matches my grep.
Reviewed-by: Eric Engestrom <eric.engestrom at imgtec.com>

> ---
>  cursor/cursor-data.h      | 2 ++
>  cursor/wayland-cursor.c   | 1 +
>  src/event-loop.c          | 1 +
>  src/scanner.c             | 1 +
>  src/wayland-client-core.h | 1 +
>  src/wayland-private.h     | 1 +
>  src/wayland-server.h      | 1 +
>  src/wayland-shm.c         | 1 +
>  tests/connection-test.c   | 1 +
>  tests/display-test.c      | 1 +
>  tests/event-loop-test.c   | 1 +
>  tests/map-test.c          | 1 +
>  tests/os-wrappers-test.c  | 1 +
>  tests/queue-test.c        | 1 +
>  tests/resources-test.c    | 1 +
>  tests/test-compositor.c   | 1 +
>  tests/test-compositor.h   | 1 +
>  17 files changed, 18 insertions(+)
> 
> diff --git a/cursor/cursor-data.h b/cursor/cursor-data.h
> index 0d03cd5..dd7a80a 100644
> --- a/cursor/cursor-data.h
> +++ b/cursor/cursor-data.h
> @@ -25,6 +25,8 @@
>  * Author:  Keith Packard, SuSE, Inc.
>  */
>  
> +#include <stdint.h>
> +
>  static uint32_t cursor_data[] = {
>  	0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000,
>  	0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
> diff --git a/cursor/wayland-cursor.c b/cursor/wayland-cursor.c
> index 18abe87..d40c5c8 100644
> --- a/cursor/wayland-cursor.c
> +++ b/cursor/wayland-cursor.c
> @@ -29,6 +29,7 @@
>  #include "wayland-client.h"
>  #include <stdio.h>
>  #include <stdlib.h>
> +#include <stdint.h>
>  #include <string.h>
>  #include <unistd.h>
>  #include <sys/mman.h>
> diff --git a/src/event-loop.c b/src/event-loop.c
> index 32216a7..6130d2a 100644
> --- a/src/event-loop.c
> +++ b/src/event-loop.c
> @@ -28,6 +28,7 @@
>  #include <errno.h>
>  #include <signal.h>
>  #include <stdlib.h>
> +#include <stdint.h>
>  #include <string.h>
>  #include <fcntl.h>
>  #include <sys/socket.h>
> diff --git a/src/scanner.c b/src/scanner.c
> index ebae4cc..d501ba7 100644
> --- a/src/scanner.c
> +++ b/src/scanner.c
> @@ -31,6 +31,7 @@
>  #include <stdbool.h>
>  #include <stdio.h>
>  #include <stdarg.h>
> +#include <stdint.h>
>  #include <string.h>
>  #include <errno.h>
>  #include <ctype.h>
> diff --git a/src/wayland-client-core.h b/src/wayland-client-core.h
> index dfd3e18..03e781b 100644
> --- a/src/wayland-client-core.h
> +++ b/src/wayland-client-core.h
> @@ -26,6 +26,7 @@
>  #ifndef WAYLAND_CLIENT_CORE_H
>  #define WAYLAND_CLIENT_CORE_H
>  
> +#include <stdint.h>
>  #include "wayland-util.h"
>  #include "wayland-version.h"
>  
> diff --git a/src/wayland-private.h b/src/wayland-private.h
> index 045109b..adfbe01 100644
> --- a/src/wayland-private.h
> +++ b/src/wayland-private.h
> @@ -30,6 +30,7 @@
>  
>  #include <stdarg.h>
>  #include <stdlib.h>
> +#include <stdint.h>
>  
>  #define WL_HIDE_DEPRECATED 1
>  
> diff --git a/src/wayland-server.h b/src/wayland-server.h
> index a6e7951..f11fb4d 100644
> --- a/src/wayland-server.h
> +++ b/src/wayland-server.h
> @@ -36,6 +36,7 @@
>  #ifndef WAYLAND_SERVER_H
>  #define WAYLAND_SERVER_H
>  
> +#include <stdint.h>
>  #include "wayland-server-core.h"
>  
>  #ifdef  __cplusplus
> diff --git a/src/wayland-shm.c b/src/wayland-shm.c
> index 20bb8c8..7fea364 100644
> --- a/src/wayland-shm.c
> +++ b/src/wayland-shm.c
> @@ -33,6 +33,7 @@
>  #include <stdbool.h>
>  #include <stdio.h>
>  #include <stdlib.h>
> +#include <stdint.h>
>  #include <string.h>
>  #include <sys/mman.h>
>  #include <unistd.h>
> diff --git a/tests/connection-test.c b/tests/connection-test.c
> index 5d97fd9..3e34f77 100644
> --- a/tests/connection-test.c
> +++ b/tests/connection-test.c
> @@ -27,6 +27,7 @@
>  #include <stdio.h>
>  #include <stdlib.h>
>  #include <stdarg.h>
> +#include <stdint.h>
>  #include <string.h>
>  #include <assert.h>
>  #include <sys/socket.h>
> diff --git a/tests/display-test.c b/tests/display-test.c
> index 17956db..f4800ce 100644
> --- a/tests/display-test.c
> +++ b/tests/display-test.c
> @@ -28,6 +28,7 @@
>  #include <stdio.h>
>  #include <stdlib.h>
>  #include <stdarg.h>
> +#include <stdint.h>
>  #include <string.h>
>  #include <assert.h>
>  #include <sys/socket.h>
> diff --git a/tests/event-loop-test.c b/tests/event-loop-test.c
> index ae5ff94..33566b4 100644
> --- a/tests/event-loop-test.c
> +++ b/tests/event-loop-test.c
> @@ -25,6 +25,7 @@
>   */
>  
>  #include <stdlib.h>
> +#include <stdint.h>
>  #include <assert.h>
>  #include <unistd.h>
>  #include <signal.h>
> diff --git a/tests/map-test.c b/tests/map-test.c
> index d259048..8ecc1aa 100644
> --- a/tests/map-test.c
> +++ b/tests/map-test.c
> @@ -25,6 +25,7 @@
>  
>  #include <stdio.h>
>  #include <stdlib.h>
> +#include <stdint.h>
>  #include <assert.h>
>  #include "wayland-private.h"
>  #include "test-runner.h"
> diff --git a/tests/os-wrappers-test.c b/tests/os-wrappers-test.c
> index b636b62..102622c 100644
> --- a/tests/os-wrappers-test.c
> +++ b/tests/os-wrappers-test.c
> @@ -27,6 +27,7 @@
>  #define _GNU_SOURCE
>  
>  #include <stdlib.h>
> +#include <stdint.h>
>  #include <assert.h>
>  #include <sys/types.h>
>  #include <sys/socket.h>
> diff --git a/tests/queue-test.c b/tests/queue-test.c
> index 932bc55..86a3602 100644
> --- a/tests/queue-test.c
> +++ b/tests/queue-test.c
> @@ -24,6 +24,7 @@
>   */
>  
>  #include <stdlib.h>
> +#include <stdint.h>
>  #include <stdio.h>
>  #include <stdbool.h>
>  #include <unistd.h>
> diff --git a/tests/resources-test.c b/tests/resources-test.c
> index 337f9f9..59d8beb 100644
> --- a/tests/resources-test.c
> +++ b/tests/resources-test.c
> @@ -26,6 +26,7 @@
>  #include <assert.h>
>  #include <sys/socket.h>
>  #include <unistd.h>
> +#include <stdint.h>
>  
>  #include "wayland-server.h"
>  #include "test-runner.h"
> diff --git a/tests/test-compositor.c b/tests/test-compositor.c
> index b01e8af..0631f61 100644
> --- a/tests/test-compositor.c
> +++ b/tests/test-compositor.c
> @@ -28,6 +28,7 @@
>  #include <stdio.h>
>  #include <string.h>
>  #include <stdlib.h>
> +#include <stdint.h>
>  #include <unistd.h>
>  #include <sys/time.h>
>  #include <sys/socket.h>
> diff --git a/tests/test-compositor.h b/tests/test-compositor.h
> index 526e912..876d0c0 100644
> --- a/tests/test-compositor.h
> +++ b/tests/test-compositor.h
> @@ -23,6 +23,7 @@
>   * SOFTWARE.
>   */
>  
> +#include <stdint.h>
>  #include <unistd.h>
>  
>  #include "wayland-server.h"
> -- 
> 2.7.2


More information about the wayland-devel mailing list