[Rprotobuf-commits] r675 - pkg/src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Dec 31 21:09:13 CET 2013


Author: murray
Date: 2013-12-31 21:09:12 +0100 (Tue, 31 Dec 2013)
New Revision: 675

Modified:
   pkg/src/ConnectionOutputStream.cpp
Log:
Explicitly cast a function return value to void to make it clearer we
are ignoring it.

Suggested by: Flexelint


Modified: pkg/src/ConnectionOutputStream.cpp
===================================================================
--- pkg/src/ConnectionOutputStream.cpp	2013-12-31 20:08:38 UTC (rev 674)
+++ pkg/src/ConnectionOutputStream.cpp	2013-12-31 20:09:12 UTC (rev 675)
@@ -16,12 +16,11 @@
     if (!was_open) {
         /* then we need to close it */
         SEXP call = PROTECT(Rf_lang2(Rf_install("close"), con));
-        Rf_eval(call, R_GlobalEnv);
+        (void)Rf_eval(call, R_GlobalEnv); // Ignore SEXP return val of close().
         UNPROTECT(1); /* call */
     }
-    /* con will be disposed by the R GC, it is
-       protected as part of the protection of the
-       external pointer that wraps this */
+    /* con will be disposed by the R GC, it is protected as part of
+       the protection of the external pointer that wraps this */
 }
 
 }  // namespace rprotobuf



More information about the Rprotobuf-commits mailing list