<!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 <susum****@gmail*****></dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Date</dt>
<dd style="margin-left: 8.5em">2018-02-09 12:10:30 +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/4e752e75e508932dcd37e09e6d02d00ad7e8b4f7">4e752e75e508932dcd37e09e6d02d00ad7e8b4f7</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, "Liberation Mono", Courier, monospace; line-height: 1.2; padding: 0.5em; width: auto">test: copy bytes into an uint64_t for strict-aliasing rules
This change suppresses the following warning (gcc):
test-table-patricia-trie-cursor.c: In function ‘geo_byte_parse’:
test-table-patricia-trie-cursor.c:397:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
grn_ntog((uint8_t *)(&geo_point), geo_byte, sizeof(grn_geo_point));
^</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/4e752e75e508932dcd37e09e6d02d00ad7e8b4f7#diff-a214c31702fb5990b51c130e3a3fab8b">test/unit/core/test-table-patricia-trie-cursor.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, "Liberation Mono", 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: test/unit/core/test-table-patricia-trie-cursor.c (+3 -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, "Liberation Mono", 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/4e752e75e508932dcd37e09e6d02d00ad7e8b4f7#diff-a214c31702fb5990b51c130e3a3fab8bL376">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/4e752e75e508932dcd37e09e6d02d00ad7e8b4f7#diff-a214c31702fb5990b51c130e3a3fab8bL377">377</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/4e752e75e508932dcd37e09e6d02d00ad7e8b4f7#diff-a214c31702fb5990b51c130e3a3fab8bL378">378</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/4e752e75e508932dcd37e09e6d02d00ad7e8b4f7#diff-a214c31702fb5990b51c130e3a3fab8bL379">379</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/4e752e75e508932dcd37e09e6d02d00ad7e8b4f7#diff-a214c31702fb5990b51c130e3a3fab8bL380">380</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/4e752e75e508932dcd37e09e6d02d00ad7e8b4f7#diff-a214c31702fb5990b51c130e3a3fab8bL381">381</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/4e752e75e508932dcd37e09e6d02d00ad7e8b4f7#diff-a214c31702fb5990b51c130e3a3fab8bL382">382</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/4e752e75e508932dcd37e09e6d02d00ad7e8b4f7#diff-a214c31702fb5990b51c130e3a3fab8bL393">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/4e752e75e508932dcd37e09e6d02d00ad7e8b4f7#diff-a214c31702fb5990b51c130e3a3fab8bL394">394</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/4e752e75e508932dcd37e09e6d02d00ad7e8b4f7#diff-a214c31702fb5990b51c130e3a3fab8bL395">395</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/4e752e75e508932dcd37e09e6d02d00ad7e8b4f7#diff-a214c31702fb5990b51c130e3a3fab8bL396">396</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/4e752e75e508932dcd37e09e6d02d00ad7e8b4f7#diff-a214c31702fb5990b51c130e3a3fab8bL397">397</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/4e752e75e508932dcd37e09e6d02d00ad7e8b4f7#diff-a214c31702fb5990b51c130e3a3fab8bL398">398</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/4e752e75e508932dcd37e09e6d02d00ad7e8b4f7#diff-a214c31702fb5990b51c130e3a3fab8bL399">399</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/4e752e75e508932dcd37e09e6d02d00ad7e8b4f7#diff-a214c31702fb5990b51c130e3a3fab8bL400">400</a></span>
</pre>
</th>
<th class="diff-line-number" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", 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/4e752e75e508932dcd37e09e6d02d00ad7e8b4f7#diff-a214c31702fb5990b51c130e3a3fab8bR376">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/4e752e75e508932dcd37e09e6d02d00ad7e8b4f7#diff-a214c31702fb5990b51c130e3a3fab8bR377">377</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/4e752e75e508932dcd37e09e6d02d00ad7e8b4f7#diff-a214c31702fb5990b51c130e3a3fab8bR378">378</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/4e752e75e508932dcd37e09e6d02d00ad7e8b4f7#diff-a214c31702fb5990b51c130e3a3fab8bR379">379</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/4e752e75e508932dcd37e09e6d02d00ad7e8b4f7#diff-a214c31702fb5990b51c130e3a3fab8bR380">380</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/4e752e75e508932dcd37e09e6d02d00ad7e8b4f7#diff-a214c31702fb5990b51c130e3a3fab8bR381">381</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/4e752e75e508932dcd37e09e6d02d00ad7e8b4f7#diff-a214c31702fb5990b51c130e3a3fab8bR382">382</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/4e752e75e508932dcd37e09e6d02d00ad7e8b4f7#diff-a214c31702fb5990b51c130e3a3fab8bR383">383</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/4e752e75e508932dcd37e09e6d02d00ad7e8b4f7#diff-a214c31702fb5990b51c130e3a3fab8bR394">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/4e752e75e508932dcd37e09e6d02d00ad7e8b4f7#diff-a214c31702fb5990b51c130e3a3fab8bR395">395</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/4e752e75e508932dcd37e09e6d02d00ad7e8b4f7#diff-a214c31702fb5990b51c130e3a3fab8bR396">396</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/4e752e75e508932dcd37e09e6d02d00ad7e8b4f7#diff-a214c31702fb5990b51c130e3a3fab8bR397">397</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </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/4e752e75e508932dcd37e09e6d02d00ad7e8b4f7#diff-a214c31702fb5990b51c130e3a3fab8bR398">398</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/4e752e75e508932dcd37e09e6d02d00ad7e8b4f7#diff-a214c31702fb5990b51c130e3a3fab8bR399">399</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/4e752e75e508932dcd37e09e6d02d00ad7e8b4f7#diff-a214c31702fb5990b51c130e3a3fab8bR400">400</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/4e752e75e508932dcd37e09e6d02d00ad7e8b4f7#diff-a214c31702fb5990b51c130e3a3fab8bR401">401</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/4e752e75e508932dcd37e09e6d02d00ad7e8b4f7#diff-a214c31702fb5990b51c130e3a3fab8bR402">402</a></span>
</pre>
</th>
<td class="diff-content" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", 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">@@ -377,6 +377,7 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">geo_byte_parse(const gchar *geo_byte_string)</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre"> {</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> gint i = 0;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> uint8_t geo_byte[sizeof(grn_geo_point)];</span>
<span class="diff-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre">+ uint64_t geo_uint;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> grn_geo_point geo_point;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> </span>
<span class="diff-not-changed" style="display: block; white-space: pre"> while (geo_byte_string[0]) {</span>
<span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -394,7 +395,8 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">geo_byte_parse(const gchar *geo_byte_string)</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre"> }</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> geo_byte_string++;</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">- grn_ntog((uint8_t *)(&geo_point), geo_byte, sizeof(grn_geo_point));</span>
<span class="diff-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre">+ grn_memcpy(&geo_uint, geo_byte, sizeof(grn_geo_point));</span>
<span class="diff-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre">+ grn_ntog((uint8_t *)(&geo_point), &geo_uint, sizeof(grn_geo_point));</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> return cut_take_printf("%dx%d",</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> geo_point.latitude,</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> geo_point.longitude);</span>
</pre>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>