Skip to content

Instantly share code, notes, and snippets.

@pftbest
Created January 28, 2017 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pftbest/722c738989974bae40636aef33719419 to your computer and use it in GitHub Desktop.
Save pftbest/722c738989974bae40636aef33719419 to your computer and use it in GitHub Desktop.
user@archserv ~/trie-cpp $ make
clang++ -O1 -g -fno-omit-frame-pointer -fsanitize=address -Wall -std=c++14 -stdlib=libc++ -c trie/main.cpp -o trie/main.o
clang++ -O1 -g -fno-omit-frame-pointer -fsanitize=address -Wall -std=c++14 -stdlib=libc++ -c trie/stdafx.cpp -o trie/stdafx.o
clang++ -O1 -g -fno-omit-frame-pointer -fsanitize=address -Wall -std=c++14 -stdlib=libc++ -c trie/tests.cpp -o trie/tests.o
clang++ -O1 -g -fno-omit-frame-pointer -fsanitize=address -Wall -std=c++14 -stdlib=libc++ -c trie/trie.cpp -o trie/trie.o
trie/trie.cpp:126:31: warning: comparison of constant 65535 with expression of type 'short' is always false
[-Wtautological-constant-out-of-range-compare]
if (trie_header->items_count == UINT16_MAX)
~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~
trie/trie.cpp:368:25: warning: array subscript is of type 'char' [-Wchar-subscripts]
if (children_offsets[i] == 0)
^~
trie/trie.cpp:370:68: warning: array subscript is of type 'char' [-Wchar-subscripts]
auto child = (node_header_info*)(temp_buffer + children_offsets[i]);
^~
trie/trie.cpp:372:56: warning: array subscript is of type 'char' [-Wchar-subscripts]
nodes.push(std::make_pair(child, &defraged_children[*number_of_children_p]));
^~~~~~~~~~~~~~~~~~~~~~
4 warnings generated.
clang++ -O1 -g -fno-omit-frame-pointer -fsanitize=address -Wall -std=c++14 -stdlib=libc++ -c trie/trie.debug.cpp -o trie/trie.debug.o
trie/trie.debug.cpp:61:25: warning: array subscript is of type 'char' [-Wchar-subscripts]
if (children_offsets[i] == 0)
^~
trie/trie.debug.cpp:63:30: warning: array subscript is of type 'char' [-Wchar-subscripts]
else if (children_offsets[i] > trie_header->next_alloc) {
^~
trie/trie.debug.cpp:67:30: warning: array subscript is of type 'char' [-Wchar-subscripts]
else if (children_offsets[i] < 0) {
^~
trie/trie.debug.cpp:71:64: warning: array subscript is of type 'char' [-Wchar-subscripts]
auto child = (node_header_info*)(_buffer + children_offsets[i]);
^~
trie/trie.debug.cpp:20:30: warning: comparison of constant 32768 with expression of type 'short' is always false
[-Wtautological-constant-out-of-range-compare]
if (trie_header->next_alloc > BUFFER_SIZE) {
~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~
trie/trie.debug.cpp:123:25: warning: array subscript is of type 'char' [-Wchar-subscripts]
if (children_offsets[i] == 0)
^~
trie/trie.debug.cpp:126:64: warning: array subscript is of type 'char' [-Wchar-subscripts]
auto child = (node_header_info*)(_buffer + children_offsets[i]);
^~
7 warnings generated.
clang++ -O1 -g -fno-omit-frame-pointer -fsanitize=address -Wall -std=c++14 -stdlib=libc++ trie/main.o trie/stdafx.o trie/tests.o trie/trie.o trie/trie.debug.o -o a.out -lc++abi
user@archserv ~/trie-cpp $
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment