Commit cccbc24
sensor: lsm6dso: Disable -Wmaybe-uninitialized for lsm6dso_mode_set
This commit disables the potentially uninitialized variable warning
(`-Wmaybe-uninitialized`) for the `lsm6dso_mode_set` function because
GCC 12 and above may report a false positive warning claiming that the
`ctrl2_ois` variable may be used uninitialized.
Note that the `ctrl2_ois` variable is always set when `aux_ctx != NULL`
and is accessed if and only if `aux_ctx != NULL`, therefore it may
never be used uninitialized as the warning claims.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>1 parent 52a522c commit cccbc24
2 files changed
+18
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11768 | 11768 | | |
11769 | 11769 | | |
11770 | 11770 | | |
| 11771 | + | |
| 11772 | + | |
| 11773 | + | |
| 11774 | + | |
| 11775 | + | |
| 11776 | + | |
| 11777 | + | |
| 11778 | + | |
| 11779 | + | |
| 11780 | + | |
11771 | 11781 | | |
11772 | 11782 | | |
11773 | 11783 | | |
| |||
12226 | 12236 | | |
12227 | 12237 | | |
12228 | 12238 | | |
| 12239 | + | |
| 12240 | + | |
| 12241 | + | |
| 12242 | + | |
12229 | 12243 | | |
12230 | 12244 | | |
12231 | 12245 | | |
| |||
0 commit comments