@@ -327,11 +327,6 @@
}
}
-#if defined(__GNUC__) || defined(__clang__)
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wsign-compare"
-#endif
-
/*
* Record IP/port of client in filesystem, so that server receiving
* the proxy can determine true client origin.
@@ -357,7 +352,8 @@
int fd = platform_open(jfn, O_CREAT | O_TRUNC | O_WRONLY, S_IRUSR | S_IWUSR | S_IRGRP);
if (fd != -1)
{
- if (write(fd, f, strlen(f)) != strlen(f))
+ ssize_t write_len = strlen(f);
+ if (write(fd, f, write_len) != write_len)
{
msg(M_WARN, "PORT SHARE: writing to journal file (%s) failed", jfn);
}
@@ -373,10 +369,6 @@
}
}
-#if defined(__GNUC__) || defined(__clang__)
-#pragma GCC diagnostic pop
-#endif
-
/*
* Cleanup function, on proxy process exit.
*/
@@ -206,11 +206,6 @@
return ret;
}
-#if defined(__GNUC__) || defined(__clang__)
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wsign-compare"
-#endif
-
#define STATUS_PRINTF_MAXLEN 512
void
@@ -240,7 +235,7 @@
if (so->fd >= 0 && !so->errors)
{
strcat(buf, "\n");
- size_t len = strlen(buf);
+ ssize_t len = strlen(buf);
if (len > 0)
{
if (write(so->fd, buf, (unsigned int)len) != len)
@@ -258,10 +253,6 @@
}
}
-#if defined(__GNUC__) || defined(__clang__)
-#pragma GCC diagnostic pop
-#endif
-
bool
status_read(struct status_output *so, struct buffer *buf)
{
@@ -184,15 +184,10 @@
return -1;
}
-#if defined(__GNUC__) || defined(__clang__)
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wsign-compare"
-#endif
-
static ssize_t
send_string(int fd, const char *string)
{
- const size_t len = strlen(string) + 1;
+ const ssize_t len = strlen(string) + 1;
const ssize_t size = write(fd, string, len);
if (size == len)
{
@@ -204,10 +199,6 @@
}
}
-#if defined(__GNUC__) || defined(__clang__)
-#pragma GCC diagnostic pop
-#endif
-
#ifdef DO_DAEMONIZE
/*