BugĀ 591216 - Warning building resolver.o
authorRyan Lortie <desrt@desrt.ca>
Thu, 12 Nov 2009 04:21:48 +0000 (23:21 -0500)
committerRyan Lortie <desrt@desrt.ca>
Thu, 12 Nov 2009 04:21:48 +0000 (23:21 -0500)
check result of write system call to quiet compiler warning

gio/tests/resolver.c

index a6b4d945cb821a7f7e9476ceda115a976f9d2de1..64bc67e225d82c09622ab179c6c8bba3b8813743 100644 (file)
@@ -415,8 +415,11 @@ static int cancel_fds[2];
 static void
 interrupted (int sig)
 {
+  gssize c;
+
   signal (SIGINT, SIG_DFL);
-  write (cancel_fds[1], "x", 1);
+  c = write (cancel_fds[1], "x", 1);
+  g_assert_cmpint(c, ==, 1);
 }
 
 static gboolean