cast some error_t's to make hurd happy

ubuntu/bionic debian/0.10.0-4
Alf Gaida 9 years ago
parent 3a8d1d2274
commit 7f59d56f19

6
debian/changelog vendored

@ -1,3 +1,9 @@
lxqt-globalkeys (0.10.0-4) unstable; urgency=medium
* cast some error_t's to make hurd happy
-- Alf Gaida <agaida@siduction.org> Sun, 27 Dec 2015 23:26:32 +0100
lxqt-globalkeys (0.10.0-3) unstable; urgency=medium
* some cleanup in debian/rules

@ -0,0 +1,61 @@
Description: cast return values to error_t
Author: Alf Gaida <agaida@siduction.org>
Bug: <url in upstream bugtracker>
Last-Update: 2015-12-27
--- lxqt-globalkeys-0.10.0.orig/daemon/pipe_utils.cpp
+++ lxqt-globalkeys-0.10.0/daemon/pipe_utils.cpp
@@ -39,10 +39,10 @@ void initBothPipeEnds(int fd[2])
error_t createPipe(int fd[2])
{
- error_t result = 0;
+ error_t result = (error_t) 0;
if (pipe(fd) < 0)
{
- result = errno;
+ result = (error_t) errno;
}
if (!result)
{
@@ -59,16 +59,16 @@ error_t readAll(int fd, void *data, size
ssize_t bytes_read = read(fd, data, length);
if (bytes_read < 0)
{
- return errno;
+ return (error_t) errno;
}
if (!bytes_read)
{
- return -1;
+ return (error_t) -1;
}
data = reinterpret_cast<char *>(data) + bytes_read;
length -= bytes_read;
}
- return 0;
+ return (error_t) 0;
}
error_t writeAll(int fd, const void *data, size_t length)
@@ -78,16 +78,16 @@ error_t writeAll(int fd, const void *dat
ssize_t bytes_written = write(fd, data, length);
if (bytes_written < 0)
{
- return errno;
+ return (error_t) errno;
}
if (!bytes_written)
{
- return -1;
+ return (error_t) -1;
}
data = reinterpret_cast<const char *>(data) + bytes_written;
length -= bytes_written;
}
- return 0;
+ return (error_t) 0;
}
void closeBothPipeEnds(int fd[2])

@ -0,0 +1 @@
error_t.patch
Loading…
Cancel
Save