Skip to content

Commit 26bd34d

Browse files
pilkibunjreback
pilkibun
authored andcommitted
CLN: fix compiler warnings in tzconversion.pyx (#27412)
1 parent 7259371 commit 26bd34d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pandas/_libs/tslibs/tzconversion.pyx

+4
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ timedelta-like}
9696
result[i] = _tz_convert_tzlocal_utc(v, tz, to_utc=True)
9797
return result
9898

99+
# silence false-positive compiler warning
100+
ambiguous_array = np.empty(0, dtype=bool)
99101
if isinstance(ambiguous, str):
100102
if ambiguous == 'infer':
101103
infer_dst = True
@@ -159,6 +161,8 @@ timedelta-like}
159161
if v_right + deltas[pos_right] == val:
160162
result_b[i] = v_right
161163

164+
# silence false-positive compiler warning
165+
dst_hours = np.empty(0, dtype=np.int64)
162166
if infer_dst:
163167
dst_hours = np.empty(n, dtype=np.int64)
164168
dst_hours[:] = NPY_NAT

0 commit comments

Comments
 (0)