diff --git a/indra/llcommon/tests/llsdserialize_test.cpp b/indra/llcommon/tests/llsdserialize_test.cpp
index 025870c9150dab2dcf4aecb7f0ea0122feae98dd..41d2fcc696bfd9a4edd2a9abe851aa5f1c73e2cc 100644
--- a/indra/llcommon/tests/llsdserialize_test.cpp
+++ b/indra/llcommon/tests/llsdserialize_test.cpp
@@ -157,8 +157,12 @@ class NamedTempScript
             // loop back to try another filename
         }
         // File is open, its name is in mPath: write it and close it.
-        (void)_write(fd, content.c_str(), content.length());
-        (void)_write(fd, "\n", 1);
+        // Truthfully, we'd just as soon ignore the return value from
+        // _write(), but Linux gcc generates fatal warnings if we do.
+        bool ok(true);
+        ok = ok && (content.length() == _write(fd, content.c_str(), content.length()));
+        ok = ok && (1                == _write(fd, "\n", 1));
+        assert(ok);
         _close(fd);
     }