Skip to content

Commit adedd05

Browse files
author
Arto Kinnunen
committed
Fix compiler warnings in Nanostack HAL
Fix compiler warnings: -"warning: 'size' argument to memset is '0'" -"warning: implicit declaration of function"
1 parent f348325 commit adedd05

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

features/nanostack/nanostack-hal-mbed-cmsis-rtos/arm_hal_fhss_timer.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17+
1718
#include "ns_types.h"
1819
#include "fhss_api.h"
1920
#include "fhss_config.h"
@@ -70,7 +71,7 @@ static fhss_timeout_s *allocate_timeout(void)
7071
{
7172
for (int i = 0; i < NUMBER_OF_SIMULTANEOUS_TIMEOUTS; i++) {
7273
if (fhss_timeout[i].fhss_timer_callback == NULL) {
73-
memset(&fhss_timeout[i], sizeof(fhss_timeout_s), 0);
74+
memset(&fhss_timeout[i], 0, sizeof(fhss_timeout_s));
7475
return &fhss_timeout[i];
7576
}
7677
}
@@ -170,3 +171,4 @@ fhss_timer_t fhss_functions = {
170171
.fhss_get_timestamp = platform_fhss_timestamp_read,
171172
.fhss_resolution_divider = 1
172173
};
174+

features/nanostack/nanostack-hal-mbed-cmsis-rtos/arm_hal_random.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@
1919

2020
#include "mbedtls/entropy_poll.h"
2121

22+
#ifdef MBEDTLS_ENTROPY_HARDWARE_ALT
23+
#if defined(MBEDTLS_PLATFORM_C)
24+
#include "mbedtls/platform.h"
25+
#endif
26+
#endif
27+
2228
void arm_random_module_init(void)
2329
{
2430
}

0 commit comments

Comments
 (0)