Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion fwk/platform/posal/src/linux/posal_data_log.c
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ static void *posal_data_alloc_log_buffer_internal(uint32_t buf_si
* Returns NULL if log code is disabled on the GUI
*/

log_pkt_ptr = log_alloc(log_code, log_pkt_size);
log_pkt_ptr = (void *)(uintptr_t) log_alloc(log_code, log_pkt_size);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need (uintptr_t)? By the way, where can I find definition of log_alloc() ?

if (NULL == log_pkt_ptr)
{
AR_MSG(DBG_ERROR_PRIO, "posal_data_alloc(): Invalid log ptr allocation log_pkt_ptr = %p", log_pkt_ptr);
Expand Down
1 change: 1 addition & 0 deletions fwk/platform/posal/src/linux/posal_linux_thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
/* ----------------------------------------------------------------------------
* Include Files
* ------------------------------------------------------------------------- */
#define _GNU_SOURCE
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are functions missing without _GNU_SOURCE?
Can we try to define in CMakefile only if compiler is gcc? https://stackoverflow.com/questions/10046114/in-cmake-how-can-i-test-if-the-compiler-is-clang

#include "posal.h"
#include "posal_thread_profiling.h"
#include "posal_internal.h"
Expand Down
1 change: 1 addition & 0 deletions fwk/platform/posal/src/linux/posal_rtld.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
/* =======================================================================
INCLUDE FILES FOR MODULE
========================================================================== */
#define _GNU_SOURCE
#include "posal.h"
#include "posal_internal.h"
#include "posal_rtld.h"
Expand Down
2 changes: 1 addition & 1 deletion fwk/platform/posal/src/linux/posal_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ int32_t posal_timer_create_v2(posal_timer_t * pp_timer,

//Allocate timer id
timer_t *timerId = NULL;
if (NULL == (timerId = (posal_timer_info_t *)posal_memory_malloc(sizeof(timer_t), heap_id)))
if (NULL == (timerId = (timer_t *)posal_memory_malloc(sizeof(timer_t), heap_id)))
{
AR_MSG(DBG_ERROR_PRIO, "Memory allocation failure");
posal_memory_free(p_timer);
Expand Down
Loading