diff --git a/src/io.c b/src/io.c
index 15123e5..48da5af 100644
--- a/src/io.c
+++ b/src/io.c
@@ -1100,7 +1100,7 @@
             nc_write_clb((void *)&arg, "</capability>", 13, 0);
         }
         if (sid) {
-            count = asprintf(&buf, "</capabilities><session-id>%u</session-id></hello>", *sid);
+            count = asprintf(&buf, "</capabilities><session-id>%" PRIu32 "</session-id></hello>", *sid);
             NC_CHECK_ERRMEM_GOTO(count == -1, ret = NC_MSG_ERROR, cleanup);
             nc_write_clb((void *)&arg, buf, count, 0);
             free(buf);
diff --git a/src/log.c b/src/log.c
index 1a6dd80..e2079d1 100644
--- a/src/log.c
+++ b/src/log.c
@@ -103,7 +103,7 @@
     if (print_clb) {
         print_clb(session, level, prv_msg);
     } else if (session && session->id) {
-        fprintf(stderr, "Session %u %s: %s\n", session->id, verb[level].label, prv_msg);
+        fprintf(stderr, "Session %" PRIu32 " %s: %s\n", session->id, verb[level].label, prv_msg);
     } else {
         fprintf(stderr, "%s: %s\n", verb[level].label, prv_msg);
     }
diff --git a/src/server_config_util_tls.c b/src/server_config_util_tls.c
index aeb9113..9301a7a 100644
--- a/src/server_config_util_tls.c
+++ b/src/server_config_util_tls.c
@@ -701,7 +701,7 @@
     NC_CHECK_ARG_RET(NULL, ctx, endpt_name, id, name, config, 1);
 
     ret = asprintf(&path, "/ietf-netconf-server:netconf-server/listen/endpoints/endpoint[name='%s']/tls/netconf-server-parameters/"
-            "client-identity-mappings/cert-to-name[id='%u']", endpt_name, id);
+            "client-identity-mappings/cert-to-name[id='%" PRIu32 "']", endpt_name, id);
     NC_CHECK_ERRMEM_GOTO(ret == -1, path = NULL; ret = 1, cleanup);
 
     ret = _nc_server_config_add_tls_ctn(ctx, path, fingerprint, map_type, name, config);
@@ -722,7 +722,7 @@
 
     if (id) {
         return nc_server_config_delete(config, "/ietf-netconf-server:netconf-server/listen/endpoints/endpoint[name='%s']/tls/"
-                "netconf-server-parameters/client-identity-mappings/cert-to-name[id='%u']", endpt_name, id);
+                "netconf-server-parameters/client-identity-mappings/cert-to-name[id='%" PRIu32 "']", endpt_name, id);
     } else {
         return nc_server_config_delete(config, "/ietf-netconf-server:netconf-server/listen/endpoints/endpoint[name='%s']/tls/"
                 "netconf-server-parameters/client-identity-mappings/cert-to-name", endpt_name);
@@ -740,7 +740,7 @@
 
     ret = asprintf(&path, "/ietf-netconf-server:netconf-server/call-home/netconf-client[name='%s']/"
             "endpoints/endpoint[name='%s']/tls/netconf-server-parameters/client-identity-mappings/"
-            "cert-to-name[id='%u']", client_name, endpt_name, id);
+            "cert-to-name[id='%" PRIu32 "']", client_name, endpt_name, id);
     NC_CHECK_ERRMEM_GOTO(ret == -1, path = NULL; ret = 1, cleanup);
 
     ret = _nc_server_config_add_tls_ctn(ctx, path, fingerprint, map_type, name, config);
diff --git a/src/session_client.c b/src/session_client.c
index 69e8f35..8b851dd 100644
--- a/src/session_client.c
+++ b/src/session_client.c
@@ -2800,7 +2800,7 @@
         rpc_k = (struct nc_rpc_kill *)rpc;
 
         CHECK_LYRC_BREAK(lyd_new_inner(NULL, mod, "kill-session", 0, &data));
-        sprintf(str, "%u", rpc_k->sid);
+        sprintf(str, "%" PRIu32, rpc_k->sid);
         CHECK_LYRC_BREAK(lyd_new_term(data, mod, "session-id", str, 0, NULL));
         break;
 
@@ -2813,7 +2813,7 @@
         }
 
         if (rpc_com->confirm_timeout) {
-            sprintf(str, "%u", rpc_com->confirm_timeout);
+            sprintf(str, "%" PRIu32, rpc_com->confirm_timeout);
             CHECK_LYRC_BREAK(lyd_new_term(data, mod, "confirm-timeout", str, 0, NULL));
         }
         if (rpc_com->persist) {
@@ -2976,7 +2976,7 @@
 
         CHECK_LYRC_BREAK(lyd_new_inner(NULL, mod, "modify-subscription", 0, &data));
 
-        sprintf(str, "%u", rpc_modsub->id);
+        sprintf(str, "%" PRIu32, rpc_modsub->id);
         CHECK_LYRC_BREAK(lyd_new_term(data, mod, "id", str, 0, NULL));
 
         if (rpc_modsub->filter) {
@@ -2999,7 +2999,7 @@
 
         CHECK_LYRC_BREAK(lyd_new_inner(NULL, mod, "delete-subscription", 0, &data));
 
-        sprintf(str, "%u", rpc_delsub->id);
+        sprintf(str, "%" PRIu32, rpc_delsub->id);
         CHECK_LYRC_BREAK(lyd_new_term(data, mod, "id", str, 0, NULL));
         break;
 
@@ -3008,7 +3008,7 @@
 
         CHECK_LYRC_BREAK(lyd_new_inner(NULL, mod, "kill-subscription", 0, &data));
 
-        sprintf(str, "%u", rpc_killsub->id);
+        sprintf(str, "%" PRIu32, rpc_killsub->id);
         CHECK_LYRC_BREAK(lyd_new_term(data, mod, "id", str, 0, NULL));
         break;
 
@@ -3065,7 +3065,7 @@
 
         CHECK_LYRC_BREAK(lyd_new_inner(NULL, mod, "modify-subscription", 0, &data));
 
-        sprintf(str, "%u", rpc_modpush->id);
+        sprintf(str, "%" PRIu32, rpc_modpush->id);
         CHECK_LYRC_BREAK(lyd_new_term(data, mod, "id", str, 0, NULL));
         CHECK_LYRC_BREAK(lyd_new_term(data, mod2, "datastore", rpc_modpush->datastore, 0, NULL));
 
@@ -3103,7 +3103,7 @@
         rpc_resyncsub = (struct nc_rpc_resyncsub *)rpc;
 
         CHECK_LYRC_BREAK(lyd_new_inner(NULL, mod, "resync-subscription", 0, &data));
-        sprintf(str, "%u", rpc_resyncsub->id);
+        sprintf(str, "%" PRIu32, rpc_resyncsub->id);
         CHECK_LYRC_BREAK(lyd_new_term(data, mod, "id", str, 0, NULL));
         break;
 
