OpenSUSE is pretty strict when it comes to the quality of the code which gets in their repo and enforce some compiler warnings to to upgraded as error. There are several ways to correct those issues: 1) fix the problem in the source The best and prefer option is to fix the code. These type errors can induce nasty side effect and often are easy to correct. 2) change the compiler option In the make file, select the the required option to ignore the error. If there is no warning from the compiler, OpenSUSE will assume (rightly or wrongly) that you know what you do and you had no choose in keeping such ugliness. 3) use rpmlinrc rpmlint calculate an ugliness marking and if you pass the threshold it fails the package. You can change the ugliness marks allocated to certain type of errors. It's often easier to go around the issue, when possible (not for all warning type) but as bad as solution 2). Conclusion. ------------------ It's often not longer to fix the code once for all. That is the prefer route. Dominig On 25/09/2019 02:55, Arce Moreno, Abraham wrote:
Hi Bin,
Based in our work for openSUSE [0], and due to rpmlint configuration, we are having 2 warnings treated as errors while building sm-db package:
[ 4s] sm_db_service_heartbeat.c: In function 'SmErrorT sm_db_service_heartbeat_insert(SmDbHandleT*, SmDbServiceHeartbeatT*)': [ 4s] sm_db_service_heartbeat.c:321:13: error: format '%li' expects argument of type 'long int', but argument 35 has type 'SmTimerIdT {aka int}' [-Werror=format=] [ 4s] record->heartbeat_timer_id, [ 4s] sm_db_service_heartbeat.c: In function 'SmErrorT sm_db_service_heartbeat_update(SmDbHandleT*, SmDbServiceHeartbeatT*)': [ 4s] sm_db_service_heartbeat.c:438:49: error: format '%li' expects argument of type 'long int', but argument 5 has type 'SmTimerIdT {aka int}' [-Werror=format=] [ 4s] record->heartbeat_timer_id ); [ 4s] cc1plus: all warnings being treated as errors
We have confirmed the package gets built after reverting commit "Enhance timer system to avoid double deregister" [1]. Can you please guide us into the right direction to get this properly fixed?
[0] https://review.opendev.org/#/c/679686/ [1] https://review.opendev.org/#/c/675936/
_______________________________________________ Starlingx-discuss mailing list Starlingx-discuss@lists.starlingx.io http://lists.starlingx.io/cgi-bin/mailman/listinfo/starlingx-discuss
-- Dominig ar Foll Senior Software Architect Intel Open Source Technology Centre