[X2Go-Commits] [x2goclient] 273/276: src/pulsemanager.cpp: cast the return value of realloc () to char*, as GCC doesn't seem to like reassigning the pointer otherwise.
git-admin at x2go.org
git-admin at x2go.org
Sat Dec 31 01:35:44 CET 2016
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch bugfix/osx
in repository x2goclient.
commit f79a1a62d24a19fa444b78a82ed4312ed855c502
Author: Mihai Moldovan <ionic at ionic.de>
Date: Sat Dec 10 14:59:09 2016 +0100
src/pulsemanager.cpp: cast the return value of realloc () to char*, as GCC doesn't seem to like reassigning the pointer otherwise.
---
debian/changelog | 2 ++
src/pulsemanager.cpp | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/debian/changelog b/debian/changelog
index d3d66cd..55786ac 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -505,6 +505,8 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium
typo ("erange" instead of "errno") and including the cerrno header.
- src/pulsemanager.cpp: use std::ssize_t for the path length, because it
could be -1 and std::size_t is not applicable.
+ - src/pulsemanager.cpp: cast the return value of realloc () to char*, as
+ GCC doesn't seem to like reassigning the pointer otherwise.
[ Bernard Cafarelli ]
* New upstream version (4.0.5.3):
diff --git a/src/pulsemanager.cpp b/src/pulsemanager.cpp
index 1878b60..203ab29 100644
--- a/src/pulsemanager.cpp
+++ b/src/pulsemanager.cpp
@@ -153,7 +153,7 @@ PulseManager::PulseManager () : app_dir_ (QApplication::applicationDirPath ()),
char *buf, *ptr;
for (buf = ptr = NULL; ptr == NULL; path_len += 20) {
- if (NULL == (buf = realloc (buf, path_len))) {
+ if (NULL == (buf = static_cast<char *> (realloc (buf, path_len)))) {
x2goErrorf (16) << "Could not allocate buffer for getting current working directory!";
show_RichText_ErrorMsgBox (tr ("Could not allocate buffer for getting current working directory!"),
QString (),
--
Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git
More information about the x2go-commits
mailing list