<!DOCTYPE html>
<html>
  <head>
  </head>
  <body>
    <dl style="line-height: 1.5; margin-left: 2em">
      <dt style="clear: both; float: left; font-weight: bold; width: 8em">Author</dt>
      <dd style="margin-left: 8.5em">Susumu Yata &lt;susum****@gmail*****&gt;</dd>
      <dt style="clear: both; float: left; font-weight: bold; width: 8em">Date</dt>
      <dd style="margin-left: 8.5em">2018-02-09 13:12:45 +0900 (Fri, 09 Feb 2018)</dd>
      <dt style="clear: both; float: left; font-weight: bold; width: 8em">New Revision</dt>
      <dd style="margin-left: 8.5em"><a href="https://github.com/groonga/groonga/commit/91d02ab340b81beab797f53736de7d2099f0b2c6">91d02ab340b81beab797f53736de7d2099f0b2c6</a></dd>
      <dt style="clear: both; float: left; font-weight: bold; width: 8em">Message</dt>
      <dd style="margin-left: 8.5em"><pre style="border: 1px solid #aaa; font-family: Consolas, Menlo, &quot;Liberation Mono&quot;, Courier, monospace; line-height: 1.2; padding: 0.5em; width: auto">Handle the return value of write to suppress a warning

This change suppresses the following warning (gcc):
  groonga.c: In function ‘send_ready_notify’:
  groonga.c:806:5: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
       write(ready_notify_pipe[PIPE_WRITE],
       ^</pre></dd>
      <dt style="clear: both; float: left; font-weight: bold; width: 8em">Modified files</dt>
      <dd style="margin-left: 8.5em">
        <ul>
          <li><a href="https://github.com/groonga/groonga/commit/91d02ab340b81beab797f53736de7d2099f0b2c6#diff-c331507c59756a6ada6edcf5407e7145">src/groonga.c</a></li>
        </ul>
      </dd>
    </dl>

    <div class="diff-section" style="clear: both">
      <table style="border-collapse: collapse; border: 1px solid #aaa">
        <thead>
          <tr class="diff-header" style="border: 1px solid #aaa">
            <td colspan="3">
<pre style="border: 0; font-family: Consolas, Menlo, &quot;Liberation Mono&quot;, Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal; width: auto"><span class="diff-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">  Modified: src/groonga.c (+15 -4)</span>
<span class="diff-header-mark" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">===================================================================</span>
</pre>
            </td>
          </tr>
        </thead>
        <tbody>
          <tr>
            <th class="diff-line-number" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, &quot;Liberation Mono&quot;, Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal; width: auto"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/91d02ab340b81beab797f53736de7d2099f0b2c6#diff-c331507c59756a6ada6edcf5407e7145L796">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/91d02ab340b81beab797f53736de7d2099f0b2c6#diff-c331507c59756a6ada6edcf5407e7145L797">797</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/91d02ab340b81beab797f53736de7d2099f0b2c6#diff-c331507c59756a6ada6edcf5407e7145L798">798</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/91d02ab340b81beab797f53736de7d2099f0b2c6#diff-c331507c59756a6ada6edcf5407e7145L799">799</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffecec; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/91d02ab340b81beab797f53736de7d2099f0b2c6#diff-c331507c59756a6ada6edcf5407e7145L800">800</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/91d02ab340b81beab797f53736de7d2099f0b2c6#diff-c331507c59756a6ada6edcf5407e7145L801">801</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/91d02ab340b81beab797f53736de7d2099f0b2c6#diff-c331507c59756a6ada6edcf5407e7145L802">802</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/91d02ab340b81beab797f53736de7d2099f0b2c6#diff-c331507c59756a6ada6edcf5407e7145L803">803</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/91d02ab340b81beab797f53736de7d2099f0b2c6#diff-c331507c59756a6ada6edcf5407e7145L804">804</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffecec; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/91d02ab340b81beab797f53736de7d2099f0b2c6#diff-c331507c59756a6ada6edcf5407e7145L805">805</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffecec; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/91d02ab340b81beab797f53736de7d2099f0b2c6#diff-c331507c59756a6ada6edcf5407e7145L806">806</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffecec; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/91d02ab340b81beab797f53736de7d2099f0b2c6#diff-c331507c59756a6ada6edcf5407e7145L807">807</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/91d02ab340b81beab797f53736de7d2099f0b2c6#diff-c331507c59756a6ada6edcf5407e7145L808">808</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/91d02ab340b81beab797f53736de7d2099f0b2c6#diff-c331507c59756a6ada6edcf5407e7145L809">809</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/91d02ab340b81beab797f53736de7d2099f0b2c6#diff-c331507c59756a6ada6edcf5407e7145L810">810</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/91d02ab340b81beab797f53736de7d2099f0b2c6#diff-c331507c59756a6ada6edcf5407e7145L811">811</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/91d02ab340b81beab797f53736de7d2099f0b2c6#diff-c331507c59756a6ada6edcf5407e7145L812">812</a></span>
</pre>
            </th>
            <th class="diff-line-number" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, &quot;Liberation Mono&quot;, Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal; width: auto"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/91d02ab340b81beab797f53736de7d2099f0b2c6#diff-c331507c59756a6ada6edcf5407e7145R796">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/91d02ab340b81beab797f53736de7d2099f0b2c6#diff-c331507c59756a6ada6edcf5407e7145R797">797</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/91d02ab340b81beab797f53736de7d2099f0b2c6#diff-c331507c59756a6ada6edcf5407e7145R798">798</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/91d02ab340b81beab797f53736de7d2099f0b2c6#diff-c331507c59756a6ada6edcf5407e7145R799">799</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/91d02ab340b81beab797f53736de7d2099f0b2c6#diff-c331507c59756a6ada6edcf5407e7145R800">800</a></span>
<span class="diff-line-number-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/91d02ab340b81beab797f53736de7d2099f0b2c6#diff-c331507c59756a6ada6edcf5407e7145R801">801</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/91d02ab340b81beab797f53736de7d2099f0b2c6#diff-c331507c59756a6ada6edcf5407e7145R802">802</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/91d02ab340b81beab797f53736de7d2099f0b2c6#diff-c331507c59756a6ada6edcf5407e7145R803">803</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/91d02ab340b81beab797f53736de7d2099f0b2c6#diff-c331507c59756a6ada6edcf5407e7145R804">804</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/91d02ab340b81beab797f53736de7d2099f0b2c6#diff-c331507c59756a6ada6edcf5407e7145R805">805</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/91d02ab340b81beab797f53736de7d2099f0b2c6#diff-c331507c59756a6ada6edcf5407e7145R806">806</a></span>
<span class="diff-line-number-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/91d02ab340b81beab797f53736de7d2099f0b2c6#diff-c331507c59756a6ada6edcf5407e7145R807">807</a></span>
<span class="diff-line-number-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/91d02ab340b81beab797f53736de7d2099f0b2c6#diff-c331507c59756a6ada6edcf5407e7145R808">808</a></span>
<span class="diff-line-number-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/91d02ab340b81beab797f53736de7d2099f0b2c6#diff-c331507c59756a6ada6edcf5407e7145R809">809</a></span>
<span class="diff-line-number-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/91d02ab340b81beab797f53736de7d2099f0b2c6#diff-c331507c59756a6ada6edcf5407e7145R810">810</a></span>
<span class="diff-line-number-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/91d02ab340b81beab797f53736de7d2099f0b2c6#diff-c331507c59756a6ada6edcf5407e7145R811">811</a></span>
<span class="diff-line-number-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/91d02ab340b81beab797f53736de7d2099f0b2c6#diff-c331507c59756a6ada6edcf5407e7145R812">812</a></span>
<span class="diff-line-number-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/91d02ab340b81beab797f53736de7d2099f0b2c6#diff-c331507c59756a6ada6edcf5407e7145R813">813</a></span>
<span class="diff-line-number-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/91d02ab340b81beab797f53736de7d2099f0b2c6#diff-c331507c59756a6ada6edcf5407e7145R814">814</a></span>
<span class="diff-line-number-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/91d02ab340b81beab797f53736de7d2099f0b2c6#diff-c331507c59756a6ada6edcf5407e7145R815">815</a></span>
<span class="diff-line-number-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/91d02ab340b81beab797f53736de7d2099f0b2c6#diff-c331507c59756a6ada6edcf5407e7145R816">816</a></span>
<span class="diff-line-number-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/91d02ab340b81beab797f53736de7d2099f0b2c6#diff-c331507c59756a6ada6edcf5407e7145R817">817</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/91d02ab340b81beab797f53736de7d2099f0b2c6#diff-c331507c59756a6ada6edcf5407e7145R818">818</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/91d02ab340b81beab797f53736de7d2099f0b2c6#diff-c331507c59756a6ada6edcf5407e7145R819">819</a></span>
<span class="diff-line-number-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/91d02ab340b81beab797f53736de7d2099f0b2c6#diff-c331507c59756a6ada6edcf5407e7145R820">820</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/91d02ab340b81beab797f53736de7d2099f0b2c6#diff-c331507c59756a6ada6edcf5407e7145R821">821</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/91d02ab340b81beab797f53736de7d2099f0b2c6#diff-c331507c59756a6ada6edcf5407e7145R822">822</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/91d02ab340b81beab797f53736de7d2099f0b2c6#diff-c331507c59756a6ada6edcf5407e7145R823">823</a></span>
</pre>
            </th>
            <td class="diff-content" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, &quot;Liberation Mono&quot;, Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal; width: auto"><span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -797,16 +797,27 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">close_ready_notify_pipe(void)</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre">   reset_ready_notify_pipe();</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> }</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> </span>
<span class="diff-deleted" style="background-color: #ffecec; color: #000000; display: block; white-space: pre">-static void</span>
<span class="diff-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre">+/* FIXME: callers ignore the return value of send_ready_notify. */</span>
<span class="diff-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre">+static grn_bool</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> send_ready_notify(void)</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> {</span>
<span class="diff-not-changed" style="display: block; white-space: pre">   if (ready_notify_pipe[PIPE_WRITE] &gt; 0) {</span>
<span class="diff-not-changed" style="display: block; white-space: pre">     const char *ready_notify_message = &quot;ready&quot;;</span>
<span class="diff-deleted" style="background-color: #ffecec; color: #000000; display: block; white-space: pre">-    write(ready_notify_pipe[PIPE_WRITE],</span>
<span class="diff-deleted" style="background-color: #ffecec; color: #000000; display: block; white-space: pre">-          ready_notify_message,</span>
<span class="diff-deleted" style="background-color: #ffecec; color: #000000; display: block; white-space: pre">-          strlen(ready_notify_message));</span>
<span class="diff-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre">+    const size_t ready_notify_message_len = strlen(ready_notify_message);</span>
<span class="diff-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre">+    size_t n = 0;</span>
<span class="diff-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre">+    do {</span>
<span class="diff-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre">+      ssize_t m = write(ready_notify_pipe[PIPE_WRITE],</span>
<span class="diff-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre">+                        ready_notify_message + n,</span>
<span class="diff-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre">+                        ready_notify_message_len - n);</span>
<span class="diff-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre">+      if (m == -1) {</span>
<span class="diff-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre">+        close_ready_notify_pipe();</span>
<span class="diff-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre">+        return GRN_FALSE;</span>
<span class="diff-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre">+      }</span>
<span class="diff-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre">+      n += m;</span>
<span class="diff-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre">+    } while (n &lt; ready_notify_message_len);</span>
<span class="diff-not-changed" style="display: block; white-space: pre">   }</span>
<span class="diff-not-changed" style="display: block; white-space: pre">   close_ready_notify_pipe();</span>
<span class="diff-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre">+  return GRN_TRUE;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> }</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> </span>
<span class="diff-not-changed" style="display: block; white-space: pre"> static void</span>
</pre>
            </td>
          </tr>
        </tbody>
      </table>
    </div>
  </body>
</html>