Part Number: TMS320F28388D
Other Parts Discussed in Thread: C2000WARE
I am working with the ethernet_ipc_ex1_basic example for the TMS320F28388D in CCS.
Previously I was using driverlib.lib, but I removed that library and started building the source files from the driverlib folder directly as part of the project. After doing that, I started seeing a few warnings in original DriverLib source files, and I would like to confirm whether this is expected or whether it indicates a real issue.
The warnings I am seeing are the following:
- In ethernet.c, inside Ethernet_retrieveRxPacket(), the variable newPktPtr is reported as assigned but never used.
Example:
Ethernet_Pkt_Desc *newPktPtr = 0U;
...
newPktPtr = (*Ethernet_device_struct.initConfig.pfcbRxPacket)(...);
From the function flow, it seems the value is assigned but never read afterwards. Is this an original legacy TI code path, or is there supposed to be a later use of this variable?
- In pmbus.c, variables such as:
const uint32_t fastPlusLow = 20000000U, fastPlusHigh = 25000000U;
are reported as “never used”, even though they appear in an if condition. I would like to know whether this is typically a false positive from the editor/clangd analysis, or whether there is some compilation condition (#ifdef, macro, etc.) that makes this warning appear.
- I also see warnings for pointer initialization with 0U, for example:
Ethernet_Pkt_Desc *newPktPtr = 0U;
I understand that NULL would be more typical here. Does TI consider this warning expected and harmless in DriverLib sources, or is there any recommendation to update such code when building DriverLib from source?
My environment:
- CCS Version: 20.5.0.28__1.11.0
- C2000Ware 26.00.00.00
- F28388D
- project based on the original TI example
- warnings started appearing only after switching from the prebuilt .lib to compiling the DriverLib .c sources directly
I would like to confirm:
- whether these warnings are expected in the original sources
- whether they can be safely ignored
- or whether there is an official recommendation for building DriverLib from source without these diagnostics, how to supress this warning
Thank you.