A build can generate a warning. The warnings are not fatal. In many (possibly all) cases a repeated build will not generate the warning again, as the task results/artifacts may be cached and the task does not need rebuilding. This way many warnings end up in effect ignored/invisible until a next "clean" build. One way to prevent this would be have an option to treat warnings as errors. Better way (but probably easier said than done) would be to ensure that tasks that generate warnings are repeated on the next build again and thus generate the same warnings again.
The latter would be very hard... Fatal warnings as a bitbake option shouldn't be too difficult though.
(In reply to comment #1) > The latter would be very hard... > > Fatal warnings as a bitbake option shouldn't be too difficult though. Ideally, if there is a warning, this should prevent writing of the corresponding build artefacts to the sstate. This way no new bitbake options are required and we should see the warning each time we repeat the build. Again, probably easier said than done.
We have over the past 2 years, migrated many warnings to errors now so this issue has been addressed to some degree.