What does this fix? Where is the conversion?
Please see https://qa.coreboot.org/job/coreboot-gerrit/110495/consoleFull:
/cb-build/coreboot-gerrit.0/default/LENOVO_T410/mainboard/lenovo/t410/static.c:74:22: error: conversion from 'int' to 'signed char:1' changes value from '1' to '-1' [-Werror=conversion]
.backlight_enable = 0x01,
^~~~
/cb-build/coreboot-gerrit.0/default/LENOVO_T410/mainboard/lenovo/t410/static.c:75:23: error: conversion from 'int' to 'signed char:1' changes value from '1' to '-1' [-Werror=conversion]
.dock_event_enable = 0x01,
^~~~
Where is the test that this patch fixes it? I don't think it does.
What the error tells us:
- GCC treats `.backlight_enable` and `.dock_event_enable` as `signed char:1`. Making that explicit in `chip.h` shouldn't change anything.
- The problem is that both are declared as `signed` with only 1 bit width. This means the only possible values are `0` and `-1`. Hence the error, when assigning `1`.
The proper solution should be to make them `unsigned` or get rid of the `:1`.
View Change
To view, visit change 34092. To unsubscribe, or for help writing mail filters, visit settings.
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ie6c5a424ff49a2df586432e1390d5a30166d6c6a
Gerrit-Change-Number: 34092
Gerrit-PatchSet: 6
Gerrit-Owner: HAOUAS Elyes <ehaouas@noos.fr>
Gerrit-Reviewer: Alexander Couzens <lynxis@fe80.eu>
Gerrit-Reviewer: HAOUAS Elyes <ehaouas@noos.fr>
Gerrit-Reviewer: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: Paul Menzel <paulepanter@users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-Comment-Date: Fri, 06 Dec 2019 10:46:15 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment