Add explicit initialization of static variables in hid_report.c

This commit is contained in:
mbanth
2021-12-09 16:15:29 +00:00
parent 26cac1abb1
commit 2b5dab51b5
4 changed files with 28 additions and 7 deletions

View File

@@ -45,6 +45,7 @@ void test_unprepared_hidGetReportDescriptor( void )
void test_prepared_hidGetReportDescriptor( void )
{
hidReportInit();
hidPrepareReportDescriptor();
unsigned char* reportDescPtr = hidGetReportDescriptor();
TEST_ASSERT_NOT_NULL( reportDescPtr );
@@ -55,6 +56,7 @@ void test_prepared_hidGetReportDescriptor( void )
void test_reset_unprepared_hidGetReportDescriptor( void )
{
hidReportInit();
hidPrepareReportDescriptor();
hidResetReportDescriptor();
unsigned char* reportDescPtr = hidGetReportDescriptor();
@@ -63,6 +65,7 @@ void test_reset_unprepared_hidGetReportDescriptor( void )
void test_reset_prepared_hidGetReportDescriptor( void )
{
hidReportInit();
hidPrepareReportDescriptor();
hidResetReportDescriptor();
hidPrepareReportDescriptor();
@@ -404,6 +407,7 @@ void test_initial_modification_with_subsequent_preparation( void )
const unsigned char header = construct_usage_header( sizeof data / sizeof( unsigned char ));
const unsigned char page = CONSUMER_CONTROL_PAGE;
hidReportInit();
unsigned retVal = hidSetReportItem( byte, bit, page, header, data );
TEST_ASSERT_EQUAL_UINT( HID_STATUS_GOOD, retVal );
@@ -484,6 +488,7 @@ void test_initial_modification_with_subsequent_verification_2( void )
void test_modification_without_subsequent_preparation( void )
{
hidReportInit();
hidPrepareReportDescriptor();
unsigned char* reportDescPtr = hidGetReportDescriptor();
TEST_ASSERT_NOT_NULL( reportDescPtr );
@@ -504,6 +509,7 @@ void test_modification_without_subsequent_preparation( void )
void test_modification_with_subsequent_preparation( void )
{
hidReportInit();
hidPrepareReportDescriptor();
unsigned char* reportDescPtr = hidGetReportDescriptor();
TEST_ASSERT_NOT_NULL( reportDescPtr );