blob: e20d75c204251c7c3e2294f872b25320d66282a4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
--- a/src/roxml_mem.c
+++ b/src/roxml_mem.c
@@ -20,7 +20,7 @@ ROXML_STATIC ROXML_INT inline void roxml
memory_cell_t *ptr = &head_cell;
memory_cell_t *to_delete = NULL;
- while ((ptr->prev != NULL) && (ptr->prev->id != pthread_self()))
+ while ((ptr->prev != NULL) && (ptr->prev->id != (unsigned long int)pthread_self()))
ptr = ptr->prev;
if (ptr->prev == NULL)
@@ -135,7 +135,7 @@ ROXML_INT void *roxml_malloc(int size, i
cell->next->prev = cell;
cell = cell->next;
cell->type = type;
- cell->id = pthread_self();
+ cell->id = (unsigned long int)pthread_self();
cell->occ = size;
cell->ptr = calloc(num, size);
head_cell.prev = cell;
--- a/src/roxml_utils.h
+++ b/src/roxml_utils.h
@@ -48,7 +48,7 @@ ROXML_STATIC_INLINE ROXML_INT int roxml_
#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 int)pthread_self();
}
ROXML_STATIC_INLINE ROXML_INT int roxml_lock_init(node_t *n)
|