]> git.ipfire.org Git - thirdparty/snapper.git/commitdiff
- added compile time check
authorArvin Schnell <aschnell@suse.de>
Tue, 2 Oct 2018 17:57:27 +0000 (19:57 +0200)
committerArvin Schnell <aschnell@suse.de>
Tue, 2 Oct 2018 17:57:27 +0000 (19:57 +0200)
client/utils/HumanString.cc

index 6abd3ce27ef19e2bcda29d3d048a50d57e760ba7..ebf53ee972effefbd0bc8f13672fded5d786cb07 100644 (file)
@@ -112,6 +112,8 @@ namespace snapper
        // Calculate the index of the suffix to use. The index increases by 1
        // when the number of leading zeros decreases by 10.
 
+       static_assert(sizeof(size) == 8, "unsigned long long not 64 bit");
+
        int i = size > 0 ? (64 - (clz(size) + 1)) / 10 : 0;
 
        if (i == 0)