Skip to content

Commit

Permalink
Fixed GCC warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
kiishor committed Mar 8, 2020
1 parent abc11b5 commit 1fdbfe8
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,29 @@
<CodeBlocks_layout_file>
<FileVersion major="1" minor="0" />
<ActiveTarget name="Debug" />
<File name="..\..\src\demo.h" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="603" topLine="12" />
</Cursor>
</File>
<File name="..\..\src\main.c" open="1" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="..\..\..\..\src\hsm.h" open="1" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="968" topLine="27" />
<Cursor1 position="2563" topLine="44" />
</Cursor>
</File>
<File name="..\..\src\demo.c" open="1" top="1" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2176" topLine="54" />
<Cursor1 position="7058" topLine="191" />
</Cursor>
</File>
<File name="..\..\..\..\src\hsm.h" open="1" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="..\..\src\demo.h" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2563" topLine="44" />
<Cursor1 position="603" topLine="12" />
</Cursor>
</File>
<File name="..\..\..\..\src\hsm.c" open="1" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="3006" topLine="69" />
</Cursor>
</File>
<File name="..\..\src\main.c" open="1" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="968" topLine="27" />
</Cursor>
</File>
</CodeBlocks_layout_file>
12 changes: 10 additions & 2 deletions demo/hierarchical_state_machine/src/demo.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ static state_machine_result_t level3_state1_exit_handler(state_machine_t * const
* --------------------- Global variables ---------------------
*/

static const state_t Level2_HSM[];
static const state_t Level3_HSM[];
static const state_t Level2_HSM[1];
static const state_t Level3_HSM[1];

// This is an array of root (top most) states .
static const state_t Level1_HSM[] =
Expand Down Expand Up @@ -125,6 +125,7 @@ static state_machine_result_t level1_state1_handler(state_machine_t * const pSta

static state_machine_result_t level1_state1_entry_handler(state_machine_t * const pState)
{
(void)(pState);
printf("L1_S1: entry handler called\n");
printf("\nState machine is in L1_S1 state\n");
printf("Supported Events are\n");
Expand All @@ -134,6 +135,7 @@ static state_machine_result_t level1_state1_entry_handler(state_machine_t * cons

static state_machine_result_t level1_state1_exit_handler(state_machine_t * const pState)
{
(void)(pState);
printf("L1_S1: exit handler called\n");
return EVENT_HANDLED;
}
Expand All @@ -154,12 +156,14 @@ static state_machine_result_t level1_state2_handler(state_machine_t * const pSta

static state_machine_result_t level1_state2_entry_handler(state_machine_t * const pState)
{
(void)(pState);
printf("L1_S2: entry handler called\n");
return EVENT_HANDLED;
}

static state_machine_result_t level1_state2_exit_handler(state_machine_t * const pState)
{
(void)(pState);
printf("L1_S2: exit handler called\n");
return EVENT_HANDLED;
}
Expand All @@ -181,12 +185,14 @@ static state_machine_result_t level2_state1_handler(state_machine_t * const pSta

static state_machine_result_t level2_state1_entry_handler(state_machine_t * const pState)
{
(void)(pState);
printf("L2_S1: entry handler called\n");
return EVENT_HANDLED;
}

static state_machine_result_t level2_state1_exit_handler(state_machine_t * const pState)
{
(void)(pState);
printf("L2_S1: exit handler called\n");
return EVENT_HANDLED;
}
Expand All @@ -208,6 +214,7 @@ static state_machine_result_t level3_state1_handler(state_machine_t * const pSta

static state_machine_result_t level3_state1_entry_handler(state_machine_t * const pState)
{
(void)(pState);
printf("L3_S1: entry handler called\n");

printf("\nState machine is in L3_S1 state\n");
Expand All @@ -221,6 +228,7 @@ static state_machine_result_t level3_state1_entry_handler(state_machine_t * cons

static state_machine_result_t level3_state1_exit_handler(state_machine_t * const pState)
{
(void)(pState);
printf("L3_S1: exit handler called\n");
return EVENT_HANDLED;
}

0 comments on commit 1fdbfe8

Please sign in to comment.