Index: nss/lib/util/utilmod.c
===================================================================
--- nss.orig/lib/util/utilmod.c
+++ nss/lib/util/utilmod.c
@@ -759,7 +759,7 @@ nssutil_DeleteSecmodDBEntry(const char *
         /* we've collected a block of data that wasn't the module we were
          * looking for, write it out */
         if (block) {
-            fwrite(block, PORT_Strlen(block), 1, fd2);
+            (void)(fwrite(block, PORT_Strlen(block), 1, fd2)+1);
             PORT_Free(block);
             block = NULL;
         }
@@ -873,7 +873,7 @@ nssutil_AddSecmodDBEntry(const char *app
         if (!libFound) {
             fprintf(fd, "library=\n");
         }
-        fwrite(block, PORT_Strlen(block), 1, fd);
+        (void)(fwrite(block, PORT_Strlen(block), 1, fd)+1);
         fprintf(fd, "\n");
         PORT_Free(block);
         block = NULL;
Index: nss/lib/dbm/src/h_page.c
===================================================================
--- nss.orig/lib/dbm/src/h_page.c
+++ nss/lib/dbm/src/h_page.c
@@ -981,7 +981,7 @@ overflow_page(HTAB *hashp)
     if (offset > SPLITMASK) {
         if (++splitnum >= NCACHED) {
 #ifndef macintosh
-            (void)fwrite(OVMSG, 1, sizeof(OVMSG) - 1, stderr);
+            (void)(fwrite(OVMSG, 1, sizeof(OVMSG) - 1, stderr)+1);
 #endif
             return (0);
         }
@@ -996,7 +996,7 @@ overflow_page(HTAB *hashp)
         free_page++;
         if (free_page >= NCACHED) {
 #ifndef macintosh
-            (void)fwrite(OVMSG, 1, sizeof(OVMSG) - 1, stderr);
+            (void)(fwrite(OVMSG, 1, sizeof(OVMSG) - 1, stderr)+1);
 #endif
             return (0);
         }
@@ -1022,7 +1022,7 @@ overflow_page(HTAB *hashp)
         if (offset > SPLITMASK) {
             if (++splitnum >= NCACHED) {
 #ifndef macintosh
-                (void)fwrite(OVMSG, 1, sizeof(OVMSG) - 1, stderr);
+                (void)(fwrite(OVMSG, 1, sizeof(OVMSG) - 1, stderr)+1);
 #endif
                 return (0);
             }
Index: nss/cmd/btoa/btoa.c
===================================================================
--- nss.orig/cmd/btoa/btoa.c
+++ nss/cmd/btoa/btoa.c
@@ -77,7 +77,7 @@ encode_file(FILE *outFile, FILE *inFile)
      * to Destroy above (because only then are we sure all data has
      * been written out).
      */
-    fwrite("\r\n", 1, 2, outFile);
+    (void)(fwrite("\r\n", 1, 2, outFile)+1);
     return SECSuccess;
 
 loser:
Index: nss/cmd/crlutil/crlgen_lex.c
===================================================================
--- nss.orig/cmd/crlutil/crlgen_lex.c
+++ nss/cmd/crlutil/crlgen_lex.c
@@ -526,7 +526,7 @@ YY_MALLOC_DECL
 /* This used to be an fputs(), but since the string might contain NUL's,
  * we now use fwrite().
  */
-#define ECHO (void)fwrite(yytext, yyleng, 1, yyout)
+#define ECHO (void)(fwrite(yytext, yyleng, 1, yyout)+1)
 #endif
 
 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
Index: nss/cmd/httpserv/httpserv.c
===================================================================
--- nss.orig/cmd/httpserv/httpserv.c
+++ nss/cmd/httpserv/httpserv.c
@@ -835,7 +835,7 @@ handle_connection(
 
             if (reqLen > 0) {
                 if (verbose > 1)
-                    fwrite(buf, 1, reqLen, stdout); /* display it */
+                    (void)(fwrite(buf, 1, reqLen, stdout)+1); /* display it */
 
                 iovs[numIOVs].iov_base = buf;
                 iovs[numIOVs].iov_len = reqLen;
Index: nss/cmd/p7content/p7content.c
===================================================================
--- nss.orig/cmd/p7content/p7content.c
+++ nss/cmd/p7content/p7content.c
@@ -52,7 +52,7 @@ PrintBytes(void *arg, const char *buf, u
     FILE *out;
 
     out = arg;
-    fwrite(buf, len, 1, out);
+    (void)(fwrite(buf, len, 1, out)+1);
 
     saw_content = PR_TRUE;
 }
Index: nss/cmd/p7env/p7env.c
===================================================================
--- nss.orig/cmd/p7env/p7env.c
+++ nss/cmd/p7env/p7env.c
@@ -56,7 +56,7 @@ EncryptOut(void *arg, const char *buf, u
     FILE *out;
 
     out = arg;
-    fwrite(buf, len, 1, out);
+    (void)(fwrite(buf, len, 1, out)+1);
 }
 
 static int
Index: nss/cmd/p7sign/p7sign.c
===================================================================
--- nss.orig/cmd/p7sign/p7sign.c
+++ nss/cmd/p7sign/p7sign.c
@@ -59,7 +59,7 @@ SignOut(void *arg, const char *buf, unsi
     FILE *out;
 
     out = (FILE *)arg;
-    fwrite(buf, len, 1, out);
+    (void)(fwrite(buf, len, 1, out)+1);
 }
 
 static int
Index: nss/cmd/selfserv/selfserv.c
===================================================================
--- nss.orig/cmd/selfserv/selfserv.c
+++ nss/cmd/selfserv/selfserv.c
@@ -400,7 +400,7 @@ printSecurityInfo(PRFileDesc *fd)
             char namePref[] = "selfserv: Negotiated server name: ";
 
             fprintf(stderr, "%s", namePref);
-            fwrite(hostInfo->data, hostInfo->len, 1, stderr);
+            (void)(fwrite(hostInfo->data, hostInfo->len, 1, stderr)+1);
             SECITEM_FreeItem(hostInfo, PR_TRUE);
             hostInfo = NULL;
             fprintf(stderr, "\n");
@@ -1511,7 +1511,7 @@ handle_connection(PRFileDesc *tcp_sock,
 
             if (reqLen > 0) {
                 if (verbose > 1)
-                    fwrite(buf, 1, reqLen, stdout); /* display it */
+                    (void)(fwrite(buf, 1, reqLen, stdout)+1); /* display it */
 
                 iovs[numIOVs].iov_base = buf;
                 iovs[numIOVs].iov_len = reqLen;
Index: nss/cmd/signtool/certgen.c
===================================================================
--- nss.orig/cmd/signtool/certgen.c
+++ nss/cmd/signtool/certgen.c
@@ -677,8 +677,8 @@ output_ca_cert(CERTCertificate *cert, CE
 
     if (encodedCertChain) {
         fprintf(out, "Content-type: application/x-x509-ca-cert\n\n");
-        fwrite(encodedCertChain->data, 1, encodedCertChain->len,
-               out);
+        (void)(fwrite(encodedCertChain->data, 1, encodedCertChain->len,
+               out)+1);
         SECITEM_FreeItem(encodedCertChain, PR_TRUE);
     } else {
         PR_fprintf(errorFD, "%s: Can't DER encode this certificate\n",
Index: nss/cmd/signtool/sign.c
===================================================================
--- nss.orig/cmd/signtool/sign.c
+++ nss/cmd/signtool/sign.c
@@ -868,5 +868,5 @@ calculate_MD5_range(FILE *fp, long r1, l
 static void
 SignOut(void *arg, const char *buf, unsigned long len)
 {
-    fwrite(buf, len, 1, (FILE *)arg);
+    (void)(fwrite(buf, len, 1, (FILE *)arg)+1);
 }
Index: nss/cmd/smimetools/cmsutil.c
===================================================================
--- nss.orig/cmd/smimetools/cmsutil.c
+++ nss/cmd/smimetools/cmsutil.c
@@ -364,7 +364,7 @@ decode(FILE *out, SECItem *input, const
         SECItem *item = (sitem.data ? &sitem
                                     : NSS_CMSMessage_GetContent(cmsg));
         if (item && item->data && item->len) {
-            fwrite(item->data, item->len, 1, out);
+            (void)(fwrite(item->data, item->len, 1, out)+1);
         }
     }
     return cmsg;
@@ -845,7 +845,7 @@ encrypted_data(struct encryptOptionsStr
         fprintf(stderr, "%s: failed to encrypt data.\n", progName);
         goto loser;
     }
-    fwrite(derOut.data, derOut.len, 1, encryptOptions->outfile);
+    (void)(fwrite(derOut.data, derOut.len, 1, encryptOptions->outfile)+1);
     /*
     if (bulkkey)
         PK11_FreeSymKey(bulkkey);
@@ -1592,7 +1592,7 @@ main(int argc, char **argv)
         if (cms_verbose) {
             fprintf(stderr, "encoding passed\n");
         }
-        fwrite(output.data, output.len, 1, outFile);
+        (void)(fwrite(output.data, output.len, 1, outFile)+1);
         if (cms_verbose) {
             fprintf(stderr, "wrote to file\n");
         }
Index: nss/cmd/modutil/lex.Pk11Install_yy.c
===================================================================
--- nss.orig/cmd/modutil/lex.Pk11Install_yy.c
+++ nss/cmd/modutil/lex.Pk11Install_yy.c
@@ -498,7 +498,7 @@ YY_MALLOC_DECL
 /* This used to be an fputs(), but since the string might contain NUL's,
  * we now use fwrite().
  */
-#define ECHO (void)fwrite(yytext, yyleng, 1, yyout)
+#define ECHO (void)(fwrite(yytext, yyleng, 1, yyout)+1)
 #endif
 
 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
Index: nss/gtests/google_test/gtest/src/gtest.cc
===================================================================
--- nss.orig/gtests/google_test/gtest/src/gtest.cc
+++ nss/gtests/google_test/gtest/src/gtest.cc
@@ -4385,7 +4385,7 @@ class ScopedPrematureExitFile {
       // errors are ignored as there's nothing better we can do and we
       // don't want to fail the test because of this.
       FILE* pfile = posix::FOpen(premature_exit_filepath, "w");
-      fwrite("0", 1, 1, pfile);
+      (void)(fwrite("0", 1, 1, pfile)+1);
       fclose(pfile);
     }
   }
