summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-07-26 11:02:27 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-07-26 11:28:15 -0400
commitfd587c876d480863d56bbbdc5e9fcf7e735d98f3 (patch)
tree9619927c5fdea787af95d3ca88f4e46f57479b46
parenta6c0b31d509f76023d8efbcd5e912863c8fb254c (diff)
systemd-python: fix gcc warning
src/python-systemd/_reader.c: In function Reader_get_catalog: src/python-systemd/_reader.c:912:53: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] assert(mid_len > l); ^
-rw-r--r--src/python-systemd/_reader.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/python-systemd/_reader.c b/src/python-systemd/_reader.c
index 98a99aa0ab..a678f69318 100644
--- a/src/python-systemd/_reader.c
+++ b/src/python-systemd/_reader.c
@@ -908,9 +908,9 @@ static PyObject* Reader_get_catalog(Reader *self, PyObject *args)
r = sd_journal_get_data(self->j, "MESSAGE_ID", &mid, &mid_len);
if (r == 0) {
- const int l = sizeof("MESSAGE_ID");
+ const size_t l = sizeof("MESSAGE_ID");
assert(mid_len > l);
- PyErr_Format(PyExc_KeyError, "%.*s", (int) mid_len - l,
+ PyErr_Format(PyExc_KeyError, "%.*s", (int) (mid_len - l),
(const char*) mid + l);
} else if (r == -ENOENT)
PyErr_SetString(PyExc_IndexError, "no MESSAGE_ID field");