summaryrefslogtreecommitdiff
path: root/hurd
diff options
context:
space:
mode:
authorFlavio Cruz <flaviocruz@gmail.com>2015-12-29 17:35:00 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2015-12-29 20:47:40 +0100
commitcc3e97aa0141410eb8b05cab34aecf65f44a164c (patch)
treef7b72d19129e8172cdde52706634b3935f329f61 /hurd
parentb4cf10f408d50e4caaeda6d2bc9df2db3398a9cd (diff)
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.
Diffstat (limited to 'hurd')
-rw-r--r--hurd/console.h7
1 files changed, 7 insertions, 0 deletions
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 <stdint.h>
+#include <string.h>
#include <wchar.h>
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. */