It looks like "hit" erroneously became a bool in commit "Use bool for boolean" on Aug 20, 2014.  It shouldn't be one.  That ++hit is within a loop that would execute should there be a double (or triple ...) leap.

Admittedly, there has never been a double leap, and the powers-that-be would probably change the "end of June/December" rule first should we get close to needing one before leap seconds are abolished altogether, but that doesn't mean we shouldn't simply allow for them.

On Tue, May 9, 2017 at 8:23 PM, Robert Elz <kre@munnari.oz.au> wrote:
The following patch was recently added to NetBSD, to appease
GCC 8 (apparently) ... "hit" is a bool, and it seems gcc 8 does
not like ++ operators applied to one of those.

(deleted parts of the diff which just showed the version ID string
being updated...)

kre

Index: src/lib/libc/time/localtime.c
diff -u src/lib/libc/time/localtime.c:1.106 src/lib/libc/time/localtime.c:1.107
--- src/lib/libc/time/localtime.c:1.106 Sat Mar 11 18:23:14 2017
+++ src/lib/libc/time/localtime.c       Tue May  9 02:30:49 2017
@@ -1716,7 +1716,7 @@ timesub(const time_t *timep, int_fast32_
                                                sp->lsis[i - 1].ls_trans + 1 &&
                                                sp->lsis[i].ls_corr ==
                                                sp->lsis[i - 1].ls_corr + 1) {
-                                                       ++hit;
+                                                       hit = true;
                                                        --i;
                                        }
                        }