void-packages/srcpkgs/nsjail/patches/fix-format-warnings.patch
2019-12-09 18:27:51 +01:00

44 lines
1.5 KiB
Diff

From 9f064737de83ee0fa39bac5c6671a8251fec437e Mon Sep 17 00:00:00 2001
From: Robert Swiecki <robert@swiecki.net>
Date: Thu, 12 Sep 2019 22:21:49 +0200
Subject: [PATCH] user: better formatting directives for printf'like functions
---
user.cc | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git user.cc user.cc
index d2342aa..e7050dc 100644
--- user.cc
+++ user.cc
@@ -257,22 +257,22 @@ bool initNsFromChild(nsjconf_t* nsjconf) {
groupsString += "]";
if (!setResGid(nsjconf->gids[0].inside_id)) {
- PLOG_E("setresgid(%u)", nsjconf->gids[0].inside_id);
+ PLOG_E("setresgid(%lu)", (unsigned long)nsjconf->gids[0].inside_id);
return false;
}
- LOG_D("setgroups(%lu, %s)", groups.size(), groupsString.c_str());
+ LOG_D("setgroups(%zu, %s)", groups.size(), groupsString.c_str());
if (setgroups(groups.size(), groups.data()) == -1) {
/* Indicate error if specific groups were requested */
if (groups.size() > 0) {
- PLOG_E("setgroups(%lu, %s) failed", groups.size(), groupsString.c_str());
+ PLOG_E("setgroups(%zu, %s) failed", groups.size(), groupsString.c_str());
return false;
}
- PLOG_D("setgroups(%lu, %s) failed", groups.size(), groupsString.c_str());
+ PLOG_D("setgroups(%zu, %s) failed", groups.size(), groupsString.c_str());
}
if (!setResUid(nsjconf->uids[0].inside_id)) {
- PLOG_E("setresuid(%u)", nsjconf->uids[0].inside_id);
+ PLOG_E("setresuid(%lu)", (unsigned long)nsjconf->uids[0].inside_id);
return false;
}
--
2.24.0