diff --git a/src/json.c b/src/json.c
index 1c30ac5..85368cb 100644
--- a/src/json.c
+++ b/src/json.c
@@ -25,7 +25,7 @@
 #include "tree_schema_internal.h"
 
 #define JSON_PUSH_STATUS_RET(CTX, STATUS) \
-    LY_CHECK_RET(ly_set_add(&CTX->status, (void*)STATUS, 1, NULL))
+    LY_CHECK_RET(ly_set_add(&CTX->status, (void *)(uintptr_t)(STATUS), 1, NULL))
 
 #define JSON_POP_STATUS_RET(CTX) \
     assert(CTX->status.count); CTX->status.count--;
diff --git a/src/out.c b/src/out.c
index 7909ce8..3272d80 100644
--- a/src/out.c
+++ b/src/out.c
@@ -114,7 +114,7 @@
 API ly_write_clb
 ly_out_clb(struct ly_out *out, ly_write_clb writeclb)
 {
-    void *prev_clb;
+    ly_write_clb prev_clb;
 
     LY_CHECK_ARG_RET(NULL, out, out->type == LY_OUT_CALLBACK, NULL);
 
diff --git a/src/plugins_types/ipv4_address.c b/src/plugins_types/ipv4_address.c
index ee8cffc..c4e06ce 100644
--- a/src/plugins_types/ipv4_address.c
+++ b/src/plugins_types/ipv4_address.c
@@ -151,7 +151,7 @@
 
         /* store zone, if any */
         if (value_len > 4) {
-            ret = lydict_insert(ctx, value + 4, value_len - 4, &val->zone);
+            ret = lydict_insert(ctx, value_str + 4, value_len - 4, &val->zone);
             LY_CHECK_GOTO(ret, cleanup);
         } else {
             val->zone = NULL;
diff --git a/src/plugins_types/ipv6_address.c b/src/plugins_types/ipv6_address.c
index 944f2f3..1204633 100644
--- a/src/plugins_types/ipv6_address.c
+++ b/src/plugins_types/ipv6_address.c
@@ -151,7 +151,7 @@
 
         /* store zone, if any */
         if (value_len > 16) {
-            ret = lydict_insert(ctx, value + 16, value_len - 16, &val->zone);
+            ret = lydict_insert(ctx, value_str + 16, value_len - 16, &val->zone);
             LY_CHECK_GOTO(ret, cleanup);
         } else {
             val->zone = NULL;
diff --git a/src/plugins_types/union.c b/src/plugins_types/union.c
index 6a2b1b4..5295d80 100644
--- a/src/plugins_types/union.c
+++ b/src/plugins_types/union.c
@@ -145,7 +145,7 @@
             *lyb_value = "";
         } else {
             *lyb_value_len = lyb_data_len - IDX_SIZE;
-            *lyb_value = lyb_data + IDX_SIZE;
+            *lyb_value = (char *)lyb_data + IDX_SIZE;
         }
     }
 }
@@ -480,7 +480,7 @@
     num = type_idx;
     num = htole64(num);
     memcpy(ret, &num, IDX_SIZE);
-    memcpy(ret + IDX_SIZE, pval, pval_len);
+    memcpy((char *)ret + IDX_SIZE, pval, pval_len);
 
     if (dynamic) {
         free(pval);
diff --git a/src/tree.h b/src/tree.h
index 3b2736c..1c283b7 100644
--- a/src/tree.h
+++ b/src/tree.h
@@ -124,7 +124,7 @@
  */
 #define LY_ARRAY_FOR_ITER(ARRAY, TYPE, ITER) \
     for (ITER = ARRAY; \
-         (ARRAY) && ((void*)ITER - (void*)ARRAY)/(sizeof(TYPE)) < (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
+         (ARRAY) && ((char *)ITER - (char *)ARRAY)/(sizeof(TYPE)) < (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
          ITER = (TYPE*)ITER + 1)
 
 /**
diff --git a/src/tree_data_helpers.c b/src/tree_data_helpers.c
index c3a842c..6bf1a6d 100644
--- a/src/tree_data_helpers.c
+++ b/src/tree_data_helpers.c
@@ -658,7 +658,7 @@
         }
 
         /* add all used prefixes */
-        value_end = value + value_len;
+        value_end = (char *)value + value_len;
         for (value_iter = value; value_iter; value_iter = value_next) {
             LY_CHECK_GOTO(ret = ly_value_prefix_next(value_iter, value_end, &substr_len, &is_prefix, &value_next), cleanup);
             if (is_prefix) {
@@ -694,7 +694,7 @@
         }
 
         /* add all used prefixes */
-        value_end = value + value_len;
+        value_end = (char *)value + value_len;
         for (value_iter = value; value_iter; value_iter = value_next) {
             LY_CHECK_GOTO(ret = ly_value_prefix_next(value_iter, value_end, &substr_len, &is_prefix, &value_next), cleanup);
             if (is_prefix) {
diff --git a/src/tree_edit.h b/src/tree_edit.h
index 358711b..bbd5b4b 100644
--- a/src/tree_edit.h
+++ b/src/tree_edit.h
@@ -59,10 +59,10 @@
  */
 #define LY_ARRAY_NEW(CTX, ARRAY, EACTION) \
     { \
-        void *p__; \
+        char *p__; \
         if (ARRAY) { \
             ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
-            p__ = realloc(((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1), \
+            p__ = (char *)realloc(((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1), \
                     sizeof(LY_ARRAY_COUNT_TYPE) + (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) * sizeof *(ARRAY))); \
             if (!p__) { \
                 --(*((LY_ARRAY_COUNT_TYPE*)(p__) - 1)); \
@@ -70,14 +70,14 @@
                 EACTION; \
             } \
         } else { \
-            p__ = malloc(sizeof(LY_ARRAY_COUNT_TYPE) + sizeof *(ARRAY)); \
+            p__ = (char *)malloc(sizeof(LY_ARRAY_COUNT_TYPE) + sizeof *(ARRAY)); \
             if (!p__) { \
                 LOGMEM(CTX); \
                 EACTION; \
             } \
             *((LY_ARRAY_COUNT_TYPE*)(p__)) = 1; \
         } \
-        p__ = (void*)((LY_ARRAY_COUNT_TYPE*)(p__) + 1); \
+        p__ = (char *)((LY_ARRAY_COUNT_TYPE*)(p__) + 1); \
         memcpy(&(ARRAY), &p__, sizeof p__); \
     }
 
@@ -131,22 +131,22 @@
  */
 #define LY_ARRAY_CREATE(CTX, ARRAY, SIZE, EACTION) \
     { \
-        void *p__; \
+        char *p__; \
         if (ARRAY) { \
-            p__ = realloc(((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1), \
+            p__ = (char *)realloc(((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1), \
                     sizeof(LY_ARRAY_COUNT_TYPE) + ((*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) + (SIZE)) * sizeof *(ARRAY))); \
             if (!p__) { \
                 LOGMEM(CTX); \
                 EACTION; \
             } \
         } else { \
-            p__ = calloc(1, sizeof(LY_ARRAY_COUNT_TYPE) + (SIZE) * sizeof *(ARRAY)); \
+            p__ = (char *)calloc(1, sizeof(LY_ARRAY_COUNT_TYPE) + (SIZE) * sizeof *(ARRAY)); \
             if (!p__) { \
                 LOGMEM(CTX); \
                 EACTION; \
             } \
         } \
-        p__ = (void*)((LY_ARRAY_COUNT_TYPE*)(p__) + 1); \
+        p__ = (char *)((LY_ARRAY_COUNT_TYPE*)(p__) + 1); \
         memcpy(&(ARRAY), &p__, sizeof p__); \
         if (ARRAY) { \
             memset(&(ARRAY)[*((LY_ARRAY_COUNT_TYPE*)(p__) - 1)], 0, (SIZE) * sizeof *(ARRAY)); \
@@ -242,10 +242,10 @@
     if (!(*LIST)) { \
         memcpy(LIST, &(NEW_ITEM), sizeof NEW_ITEM); \
     } else { \
-        size_t offset__ = (void*)&(*LIST)->LINKER - (void*)(*LIST); \
-        void **iter__ = (void **)((size_t)(*LIST) + offset__); \
+        size_t offset__ = (char *)&(*LIST)->LINKER - (char *)(*LIST); \
+        char **iter__ = (char **)((size_t)(*LIST) + offset__); \
         while (*iter__) { \
-            iter__ = (void **)((size_t)(*iter__) + offset__); \
+            iter__ = (char **)((size_t)(*iter__) + offset__); \
         } \
         memcpy(iter__, &(NEW_ITEM), sizeof NEW_ITEM); \
     }
@@ -263,7 +263,7 @@
  */
 #define LY_LIST_NEW(CTX, LIST, NEW_ITEM, LINKER, EACTION) \
     { \
-        void *p__ = calloc(1, sizeof *NEW_ITEM); \
+        char *p__ = (char *)calloc(1, sizeof *NEW_ITEM); \
         if (!p__) { \
             LOGMEM(CTX); \
             EACTION; \
