mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-11-26 19:25:02 +00:00
vboot_display: fix -Wwrite-strings compiler errors
VbHWID() returns a fixed string which can also be a returning a
string that lives in the read only text segment or read only flash.
Because of this the compiler will rightfully error when built with
-Werror and -Wwrite-strings because the const qualifier is being
ignored. Correct this and the ripple effect in VbRenderTextAtPos().
VbRenderTextAtPos() should be using constant strings anyhow.
BUG=chrome-os-partner:17695
BRANCH=None
TEST=built fwlib with -Werror -Wwrite-strings. Compiles correctly. make
runtests still passes as well.
Change-Id: Id03a783d2d9b5de4cc3b3ce0fa6d74934751cca4
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/44043
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
This commit is contained in:
@@ -34,7 +34,7 @@ ImageInfo *VbFindFontGlyph(VbFont_t *font, uint32_t ascii,
|
||||
/**
|
||||
* Try to display the specified text at a particular position.
|
||||
*/
|
||||
void VbRenderTextAtPos(char *text, int right_to_left,
|
||||
void VbRenderTextAtPos(const char *text, int right_to_left,
|
||||
uint32_t x, uint32_t y, VbFont_t *font);
|
||||
|
||||
/**
|
||||
@@ -45,7 +45,7 @@ const char *RecoveryReasonString(uint8_t code);
|
||||
/**
|
||||
* Return a fixed string representing the HWID.
|
||||
*/
|
||||
char *VbHWID(VbCommonParams *cparams);
|
||||
const char *VbHWID(VbCommonParams *cparams);
|
||||
|
||||
/**
|
||||
* Get the number of localizations in the GBB bitmap data.
|
||||
|
||||
Reference in New Issue
Block a user