Skip to content

Commit 6e56802

Browse files
committed
Fix uninitialized warning
1 parent 356529b commit 6e56802

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pandas/_libs/hashtable_func_helper.pxi.in

+1
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ cdef value_count_{{dtype}}(const {{dtype}}_t[:] values, bint dropna, const uint8
114114
result_counts[i] = table.vals[k]
115115

116116
if na_counter > 0:
117+
assert n > 0 # val will be uninitialized without this
117118
result_counts[table.size] = na_counter
118119
result_keys.append(val)
119120

0 commit comments

Comments
 (0)