From fd587c876d480863d56bbbdc5e9fcf7e735d98f3 Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Fri, 26 Jul 2013 11:02:27 -0400 Subject: 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); ^ --- src/python-systemd/_reader.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/python-systemd') 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"); -- cgit v1.2.3-54-g00ecf