@@ -56,7 +56,7 @@ bool is_tree_granted(node::permission::FSPermission::RadixTree* granted_tree,
5656 // is UNC file path
5757 if (param.rfind (" \\\\ " , 0 ) == 0 ) {
5858 // return lookup with normalized param
59- int starting_pos = 4 ; // "\\?\"
59+ size_t starting_pos = 4 ; // "\\?\"
6060 if (param.rfind (" \\\\ ?\\ UNC\\ " ) == 0 ) {
6161 starting_pos += 4 ; // "UNC\"
6262 }
@@ -176,7 +176,7 @@ bool FSPermission::RadixTree::Lookup(const std::string_view& s,
176176 if (current_node->children .size () == 0 ) {
177177 return when_empty_return;
178178 }
179- unsigned int parent_node_prefix_len = current_node->prefix .length ();
179+ size_t parent_node_prefix_len = current_node->prefix .length ();
180180 const std::string path (s);
181181 auto path_len = path.length ();
182182
@@ -202,10 +202,10 @@ bool FSPermission::RadixTree::Lookup(const std::string_view& s,
202202void FSPermission::RadixTree::Insert (const std::string& path) {
203203 FSPermission::RadixTree::Node* current_node = root_node_;
204204
205- unsigned int parent_node_prefix_len = current_node->prefix .length ();
206- int path_len = path.length ();
205+ size_t parent_node_prefix_len = current_node->prefix .length ();
206+ size_t path_len = path.length ();
207207
208- for (int i = 1 ; i <= path_len; ++i) {
208+ for (size_t i = 1 ; i <= path_len; ++i) {
209209 bool is_wildcard_node = path[i - 1 ] == ' *' ;
210210 bool is_last_char = i == path_len;
211211
0 commit comments