Add initial meta-stx to support StarlingX build
[pti/rtp.git] / meta-stx / recipes-core / stx-ha / files / 0003-pragma-ignore-Wunused-result-errors-with-gcc-8.3.patch
1 From b990cc6c5fad7fb0599dbdbb0ea693dca885d1ed Mon Sep 17 00:00:00 2001
2 From: "Sar Ashki, Babak" <Babak.SarAshki@windriver.com>
3 Date: Fri, 24 Jan 2020 14:16:16 -0800
4 Subject: [PATCH] pragma ignore -Wunused-result errors with gcc 8.3
5
6 ---
7  service-mgmt/sm/src/sm_node_api.cpp | 4 ++++
8  1 file changed, 4 insertions(+)
9
10 diff --git a/service-mgmt/sm/src/sm_node_api.cpp b/service-mgmt/sm/src/sm_node_api.cpp
11 index 179ec77..2866dbe 100644
12 --- a/service-mgmt/sm/src/sm_node_api.cpp
13 +++ b/service-mgmt/sm/src/sm_node_api.cpp
14 @@ -829,7 +829,9 @@ static bool sm_node_api_reboot_timeout( SmTimerIdT timer_id, int64_t user_data )
15          return( true );
16      }
17  
18 +#pragma GCC diagnostic ignored "-Wunused-result"
19      write( sysrq_handler_fd, "1", 1 );
20 +#pragma GCC diagnostic error "-Wunused-result"
21      close( sysrq_handler_fd );
22  
23      // Trigger sysrq command.
24 @@ -856,7 +858,9 @@ static bool sm_node_api_reboot_timeout( SmTimerIdT timer_id, int64_t user_data )
25                "************************************" );
26  
27      sleep(5); // wait 5 seconds before a forced reboot.
28 +#pragma GCC diagnostic ignored "-Wunused-result"
29      write( sysrq_tigger_fd, "b", 1 ); 
30 +#pragma GCC diagnostic error "-Wunused-result"
31      close( sysrq_tigger_fd );
32  
33      return( true );
34 -- 
35 2.23.0
36