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
1 change: 1 addition & 0 deletions src/roxml_cat.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <getopt.h>
#include <string.h>
#include <errno.h>
#include <libgen.h>
#include "roxml.h"

static struct option long_options[] =
Expand Down
2 changes: 1 addition & 1 deletion src/roxml_mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ ROXML_INT void *roxml_malloc(int size, int num, int type)
cell->next->prev = cell;
cell = cell->next;
cell->type = type;
cell->id = pthread_self();
cell->id = (unsigned long)pthread_self();
Copy link
Owner

Choose a reason for hiding this comment

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

Is fixing the other way around much harder? I'd rather make the id member of memory_cell_t a pthread_t than cast it.

Copy link
Contributor

Choose a reason for hiding this comment

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

Normally this should not pose any issue, as memory_cell_t does not appear to be an exported type (roxml_types.h is noinst).

cell->occ = size;
cell->ptr = calloc(num, size);
head_cell.prev = cell;
Expand Down
2 changes: 1 addition & 1 deletion src/roxml_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ ROXML_STATIC_INLINE ROXML_INT int roxml_unlock(node_t *n)
#else /* CONFIG_XML_THREAD_SAFE==1 */
ROXML_STATIC_INLINE ROXML_INT unsigned long int roxml_thread_id(node_t *n)
{
return pthread_self();
return (unsigned long)pthread_self();
Copy link
Contributor

@emmanuel-deloget emmanuel-deloget Nov 17, 2025

Choose a reason for hiding this comment

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

I wonder what the good fix would be here ; this is an internal function that is never used through the code. Is a fix worth it? Wouldn't it be better to just remove it? Or (perhaps) use it instead of calling pthread_self() in other places of the code?

}

ROXML_STATIC_INLINE ROXML_INT int roxml_lock_init(node_t *n)
Expand Down