richard_damon wrote on Thursday, March 03, 2011:
Sounds like the compiler is being over picky (I do note that it is just giving a warning and not an error, compilers are allowed to warn about anything they want)
structs and classes are allowed to not have constructors, and to be compatible with C, they can not have constructors (and be structs). The compiler is saying that this isn’t a good idea as the members will not be automatically initialized, and it considers this not a good practice so it wishes to warn you about it.
There are a couple of options, one is to just turn off the warnings in the compiler options. A second, if you don’t want to globally disable that warning, is to edit the file to add the appropriate pragma (assume the compiler provides one) to disable and restore the error around the piece of code giving the problem. This could be done in task.h, and need to be redone every time you update FreeRTOS, or in your source files just before including task.h, and need to be done in every file that does so (it might be worth creating a task.hpp that just does this and then includes task.h)