Moved definition of ucBufferStorage out of if macro. (#459)

* Moved definition of ucBufferStorage out of if macro. If ucBufferStorage is only defined when configSUPPORT_STATIC_ALLOCATION ist set to 1, compilation will fail in cases where it is set to 0 or not defined (because it defaults to 0, as described in the documenation).
pull/463/head^2
Pascal 4 years ago committed by GitHub
parent d93a3d63a0
commit d264c1f153
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -19,10 +19,9 @@
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* http://www.FreeRTOS.org
* http://aws.amazon.com/freertos
* https://www.FreeRTOS.org
* https://github.com/FreeRTOS
*
* 1 tab == 4 spaces!
*/
/* Standard includes. */
@ -124,16 +123,16 @@ static void prvInterruptTriggerLevelTest( void *pvParameters );
static void prvSenderTask( void *pvParameters );
static StaticStreamBuffer_t xStaticStreamBuffers[ sbNUMBER_OF_ECHO_CLIENTS ];
/* The +1 is to make the test logic easier as the function that calculates the
free space will return one less than the actual free space - adding a 1 to the
actual length makes it appear to the tests as if the free space is returned as
it might logically be expected. Returning 1 less than the actual free space is
fine as it can never result in an overrun. */
static uint8_t ucBufferStorage[ sbNUMBER_OF_SENDER_TASKS ][ sbSTREAM_BUFFER_LENGTH_BYTES + 1 ];
static uint32_t ulSenderLoopCounters[ sbNUMBER_OF_SENDER_TASKS ] = { 0 };
#endif /* configSUPPORT_STATIC_ALLOCATION */
/* The +1 is to make the test logic easier as the function that calculates the
free space will return one less than the actual free space - adding a 1 to the
actual length makes it appear to the tests as if the free space is returned as
it might logically be expected. Returning 1 less than the actual free space is
fine as it can never result in an overrun. */
static uint8_t ucBufferStorage[ sbNUMBER_OF_SENDER_TASKS ][ sbSTREAM_BUFFER_LENGTH_BYTES + 1 ];
/*-----------------------------------------------------------*/
/* The buffers used by the echo client and server tasks. */
@ -1240,4 +1239,3 @@ BaseType_t x;
return xErrorStatus;
}
/*-----------------------------------------------------------*/

Loading…
Cancel
Save