]> git.baikalelectronics.ru Git - uboot.git/commit
common/console.c: discard volatile
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Wed, 12 Feb 2020 17:23:49 +0000 (18:23 +0100)
committerTom Rini <trini@konsulko.com>
Thu, 13 Feb 2020 15:10:50 +0000 (10:10 -0500)
commit6c73d93a8ae7e20ab3441914090b83b71149da30
tree94d5b0cc859b30cca2a2a4ed1ec137c7ebbc623a
parent4ddad8cacaf738dee71fdf9ece4c545620c3240b
common/console.c: discard volatile

Avoid errors of like

common/console.c: In function ‘console_record_reset’:
common/console.c:615:16: error: passing argument 1 of ‘membuff_purge’
discards ‘volatile’ qualifier from pointer target type
[-Werror=discarded-qualifiers]
  615 |  membuff_purge(&gd->console_out);
      |                ^~~~~~~~~~~~~~~~

by casting to non-volatile.

The volatile property stems from declarations like

arch/arm/include/asm/global_data.h:114:

But there is no need to treat gd->console_out and gd->console_in as
volatile in the context of common/console.c.

Fixes: b39d111759e4 ("console: Add a function to read a line of the output / eof")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
common/console.c