Update git submodule again and disable Write-strings warning

master
Melroy van den Berg 2020-12-12 04:10:15 +01:00
parent ee715f38ad
commit 2a81a006f4
2 changed files with 7 additions and 2 deletions

2
.gitmodules vendored
View File

@ -4,4 +4,4 @@
[submodule "lib/ipfs-http-client"]
path = lib/ipfs-http-client
url = https://github.com/danger89/cpp-ipfs-http-client.git
url = https://github.com/vasild/cpp-ipfs-http-client.git

View File

@ -15,8 +15,13 @@ int IPFS::startIPFSDaemon()
dup2(fd, 2); // ..and same with stderr
close(fd); // close fd
// Ignore ISO C++ forbids converting a string constant to char*
// This is valid in C.
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wwrite-strings"
// stdout and stderr now write to /dev/null
// Ready to call exec to start IPFS Daemon
constexpr char *proc[] = { "../../go-ipfs/ipfs", "daemon", "--init", "--migrate", 0};
constexpr char *proc[] = { "../../go-ipfs/ipfs", "daemon", "--init", "--migrate", NULL};
#pragma GCC diagnostic pop
return execv(proc[0], proc);
}