1 Answer
- Newest
- Most votes
- Most comments
0
Hi Obinex. You have several problems with your C code. You have a warning at line 490 because tempDisplay()
is not returning a value. Even if you added return str_tmp;
, you'll still have problems because str_tmp
is an automatic variable and will not be usable after tempDisplay()
returns.
Relevant content
- Accepted Answerasked a year ago
- asked 2 years ago
- AWS OFFICIALUpdated 9 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 3 months ago
Hey Greg_B, thank you for the reply, I have changed line 482 in the first image from "static BaseType_T" to "const void *" and it rectified the warning although, I am still receiving the same result, what could be another course of action I can take?, what .c or .h files should I look at in the workspace or is that not necessary?
Have you implemented fixes for the two issues I mentioned? If your function still does not have a return statement, you will suffer undefined behaviour. Likely a bad pointer, hence the program crashes. Even if you fix that, if you don't fix the second thing I mentioned, you will return a pointer to an array that no longer exists, and hence you will publish junk.
I'm not sure what your project is, but should you be continuing with C? Is it perhaps possible for you to complete your project by emulating a device using one of our other device SDKs? Python perhaps?