<!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">Kouhei Sutou &lt;kou****@clear*****&gt;</dd>
      <dt style="clear: both; float: left; font-weight: bold; width: 8em">Date</dt>
      <dd style="margin-left: 8.5em">2013-06-11 17:21:00 +0900 (Tue, 11 Jun 2013)</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/d1845f79a2ea337abb696093300e7fd392d71e22">d1845f79a2ea337abb696093300e7fd392d71e22</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">clang: suppress a warning

Initialize grn_id explicitly.

    db.c:2430:7: warning: variable 'id' is used uninitialized whenever 'if'
          condition is false [-Wsometimes-uninitialized]
          WITH_NORMALIZE(hash, key, key_size, {
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    db.c:46:9: note: expanded from macro 'WITH_NORMALIZE'
        if ((nstr = grn_string_open(ctx, key, key_size,\
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    db.c:2433:11: note: uninitialized use occurs here
          if (id) { grn_table_add(ctx, res, &amp;id, sizeof(grn_id), NULL); }
              ^~
    db.c:2430:7: note: remove the 'if' if its condition is always true
          WITH_NORMALIZE(hash, key, key_size, {
          ^
    db.c:46:5: note: expanded from macro 'WITH_NORMALIZE'
        if ((nstr = grn_string_open(ctx, key, key_size,\
        ^
    db.c:2429:16: note: initialize the variable 'id' to silence this warning
          grn_id id;
                   ^
                    = 0</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/d1845f79a2ea337abb696093300e7fd392d71e22#diff-0">lib/db.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: lib/db.c (+1 -1)</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/d1845f79a2ea337abb696093300e7fd392d71e22#L0L2425">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/d1845f79a2ea337abb696093300e7fd392d71e22#L0L2426">2426</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/d1845f79a2ea337abb696093300e7fd392d71e22#L0L2427">2427</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/d1845f79a2ea337abb696093300e7fd392d71e22#L0L2428">2428</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/d1845f79a2ea337abb696093300e7fd392d71e22#L0L2429">2429</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/d1845f79a2ea337abb696093300e7fd392d71e22#L0L2430">2430</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/d1845f79a2ea337abb696093300e7fd392d71e22#L0L2431">2431</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/d1845f79a2ea337abb696093300e7fd392d71e22#L0L2432">2432</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/d1845f79a2ea337abb696093300e7fd392d71e22#L0R2425">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/d1845f79a2ea337abb696093300e7fd392d71e22#L0R2426">2426</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/d1845f79a2ea337abb696093300e7fd392d71e22#L0R2427">2427</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/d1845f79a2ea337abb696093300e7fd392d71e22#L0R2428">2428</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: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/d1845f79a2ea337abb696093300e7fd392d71e22#L0R2429">2429</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/d1845f79a2ea337abb696093300e7fd392d71e22#L0R2430">2430</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/d1845f79a2ea337abb696093300e7fd392d71e22#L0R2431">2431</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/d1845f79a2ea337abb696093300e7fd392d71e22#L0R2432">2432</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">@@ -2426,7 +2426,7 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">grn_table_search(grn_ctx *ctx, grn_obj *table, const void *key, uint32_t key_siz</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre">   case GRN_TABLE_HASH_KEY :</span>
<span class="diff-not-changed" style="display: block; white-space: pre">     {</span>
<span class="diff-not-changed" style="display: block; white-space: pre">       grn_hash *hash = (grn_hash *)table;</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">-      grn_id id;</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+      grn_id id = GRN_ID_NIL;</span>
<span class="diff-not-changed" style="display: block; white-space: pre">       WITH_NORMALIZE(hash, key, key_size, {</span>
<span class="diff-not-changed" style="display: block; white-space: pre">         id = grn_hash_get(ctx, hash, key, key_size, NULL);</span>
<span class="diff-not-changed" style="display: block; white-space: pre">       });</span>
</pre>
            </td>
          </tr>
        </tbody>
      </table>
    </div>
  </body>
</html>