From cc3e97aa0141410eb8b05cab34aecf65f44a164c Mon Sep 17 00:00:00 2001 From: Flavio Cruz Date: Tue, 29 Dec 2015 17:35:00 +0100 Subject: fix compiler warnings in hurd/console-client console-client: Fix several compiler warnings. * console-client/bdf.c: Use size_t instead of int. * console-client/driver.c: Remove unused variable errstring. * console-client/pc-kbd.c: Cast sc to scancode_x1 before comparing with enum values. * console-client/vga-dynacolor.h: Use an explicit if in reference counting. * console-client/vga-dynafont.c: Use usigned char for bitmaps. * console-client/vga-support.c: Use unsigned char instead of char. * console-client/vga-support.h: Likewise. * console-client/vga.c: Use conchar_attr_equal instead of casting structures to integers. * hurd/console.h: Add conchar_attr_equal to compare conchar_attr_t structures. --- hurd/console.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'hurd') diff --git a/hurd/console.h b/hurd/console.h index 05177eb2..f0374936 100644 --- a/hurd/console.h +++ b/hurd/console.h @@ -20,6 +20,7 @@ #define _HURD_CONSOLE_H #include +#include #include typedef enum @@ -51,6 +52,12 @@ typedef struct uint32_t bold : 1; } conchar_attr_t; +static inline int +conchar_attr_equal (conchar_attr_t *c1, conchar_attr_t *c2) +{ + return !memcmp (c1, c2, sizeof (conchar_attr_t)); +} + /* We support double-width characters by using an extra bit to identify the continuation in the character matrix. The constants below document our usage of wchar_t. */ -- cgit v1.2.3