summaryrefslogtreecommitdiffstats
path: root/bsps/i386/pc386/console/vgacons.c
diff options
context:
space:
mode:
Diffstat (limited to 'bsps/i386/pc386/console/vgacons.c')
-rw-r--r--bsps/i386/pc386/console/vgacons.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/bsps/i386/pc386/console/vgacons.c b/bsps/i386/pc386/console/vgacons.c
index 9aa1ed4fb1..a3b326d8e1 100644
--- a/bsps/i386/pc386/console/vgacons.c
+++ b/bsps/i386/pc386/console/vgacons.c
@@ -170,8 +170,12 @@ bool vgacons_probe(
rtems_status_code status;
static bool firstTime = true;
- if ((*(unsigned char*) NB_MAX_ROW_ADDR == 0) &&
- (*(unsigned short*)NB_MAX_COL_ADDR == 0)) {
+ /*
+ * See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99578#c16
+ */
+ const uint8_t* volatile nb_max_row = (const uint8_t*) NB_MAX_ROW_ADDR;
+ const uint16_t* volatile nb_max_col = (const uint16_t*) NB_MAX_COL_ADDR;
+ if ((*nb_max_row == 0) && (*nb_max_col == 0)) {
return false;
}