eclipse-threadx / netxduo

Eclipse ThreadX - NetXDuo is an advanced, industrial-grade TCP/IP network stack designed specifically for deeply embedded real-time and IoT applications
https://github.com/eclipse-threadx/rtos-docs/blob/main/rtos-docs/netx-duo/index.md
MIT License
247 stars 140 forks source link

Incorrect type conversion to double in ASC #12

Closed ryanwinter closed 3 years ago

ryanwinter commented 4 years ago

The following line contains an unnecessary cast from a uint32_t to a double, and back to a uint32_t.

https://github.com/azure-rtos/netxduo/blob/7413f09e70875ad465f5658fdb5a59902778bf50/addons/azure_iot/azure_iot_security_module/iot-security-module-core/src/core.c#L126

This is generating a gcc compiler warning (for the Renesas RX GCC compiler):

C:/projects/iot/getting-started/core/lib/netxduo/addons/azure_iot/azure_iot_security_module/iot-security-module-core/src/core.c:126:31: error: conversion from 'uint32_t' {aka 'long unsigned int'} to 'double' may change value [-Werror=conversion]
             double interval = priority_collectors_get_interval(prioritized_collectors);
ryanwinter commented 4 years ago

@illandsb

illandsb commented 3 years ago

The fix is ready on DevOps repo and planned to be published on March release

yuxin-azrtos commented 3 years ago

Close this issue as it will be released in March.