Skip to content

Commit 883dbce

Browse files
committed
Remove double semicolons after sed'ing defines
Also see weidai11#889
1 parent 589c252 commit 883dbce

12 files changed

+40
-40
lines changed

adler32.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ void Adler32::TruncatedFinal(byte *hash, size_t size)
7272
hash[0] = byte(m_s2 >> 8);
7373
// fall through
7474
case 0:
75-
;;
75+
;
7676
// fall through
7777
}
7878

asn.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ void EncodedObjectFilter::Put(const byte *inString, size_t length)
455455
// fall through
456456
case TAIL:
457457
case ALL_DONE:
458-
default: ;;
458+
default: ;
459459
}
460460

461461
if (m_state == IDENTIFIER && m_level == 0)

cham.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ void CHAM128::Enc::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock,
273273
break;
274274
}
275275
default:
276-
CRYPTOPP_ASSERT(0);;
276+
CRYPTOPP_ASSERT(0);
277277
}
278278

279279
PutBlock<word32, BigEndian> oblock(xorBlock, outBlock);
@@ -329,7 +329,7 @@ void CHAM128::Dec::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock,
329329
break;
330330
}
331331
default:
332-
CRYPTOPP_ASSERT(0);;
332+
CRYPTOPP_ASSERT(0);
333333
}
334334

335335
PutBlock<word32, BigEndian> oblock(xorBlock, outBlock);

filters.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ bool Filter::Flush(bool hardFlush, int propagation, bool blocking)
8787
if (OutputFlush(1, hardFlush, propagation, blocking))
8888
return true;
8989
// fall through
90-
default: ;;
90+
default: ;
9191
}
9292
return false;
9393
}
@@ -104,7 +104,7 @@ bool Filter::MessageSeriesEnd(int propagation, bool blocking)
104104
if (ShouldPropagateMessageSeriesEnd() && OutputMessageSeriesEnd(1, propagation, blocking))
105105
return true;
106106
// fall through
107-
default: ;;
107+
default: ;
108108
}
109109
return false;
110110
}

lea.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ void LEA::Base::UncheckedSetKey(const byte *userKey, unsigned int keyLength, con
616616
break;
617617
}
618618
default:
619-
CRYPTOPP_ASSERT(0);;
619+
CRYPTOPP_ASSERT(0);
620620
}
621621
}
622622

lea_simd.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ template <unsigned int IDX>
181181
inline uint32x4_t UnpackNEON(const uint32x4_t& a, const uint32x4_t& b, const uint32x4_t& c, const uint32x4_t& d)
182182
{
183183
// Should not be instantiated
184-
CRYPTOPP_ASSERT(0);;
184+
CRYPTOPP_ASSERT(0);
185185
return vmovq_n_u32(0);
186186
}
187187

@@ -221,7 +221,7 @@ template <unsigned int IDX>
221221
inline uint32x4_t UnpackNEON(const uint32x4_t& v)
222222
{
223223
// Should not be instantiated
224-
CRYPTOPP_ASSERT(0);;
224+
CRYPTOPP_ASSERT(0);
225225
return vmovq_n_u32(0);
226226
}
227227

mersenne.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ class MersenneTwister : public RandomNumberGenerator
9292
case 2: output[1] = CRYPTOPP_GET_BYTE_AS_BYTE(temp, 2); /* fall through */
9393
case 1: output[0] = CRYPTOPP_GET_BYTE_AS_BYTE(temp, 3); break;
9494

95-
default: CRYPTOPP_ASSERT(0); ;;
95+
default: CRYPTOPP_ASSERT(0); ;
9696
}
9797

9898
// Wipe temp

rijndael.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ void Rijndael::Base::FillDecTable()
299299
word32 y = word32(fd(x))<<8 | word32(f9(x))<<16 | word32(fe(x))<<24;
300300
Td[i] = word64(y | fb(x))<<32 | y | x;
301301
#else
302-
word32 y = fb(x) | word32(fd(x))<<8 | word32(f9(x))<<16 | word32(fe(x))<<24;;
302+
word32 y = fb(x) | word32(fd(x))<<8 | word32(f9(x))<<16 | word32(fe(x))<<24;
303303
for (int j=0; j<4; j++)
304304
{
305305
Td[i+j*256] = y;

sha_simd.cpp

+16-16
Original file line numberDiff line numberDiff line change
@@ -862,118 +862,118 @@ void SHA256_HashMultipleBlocks_ARMV8(word32 *state, const word32 *data, size_t l
862862
TMP1 = vaddq_u32(MSG1, vld1q_u32(&SHA256_K[0x04]));
863863
STATE0 = vsha256hq_u32(STATE0, STATE1, TMP0);
864864
STATE1 = vsha256h2q_u32(STATE1, TMP2, TMP0);
865-
MSG0 = vsha256su1q_u32(MSG0, MSG2, MSG3);;
865+
MSG0 = vsha256su1q_u32(MSG0, MSG2, MSG3);
866866

867867
// Rounds 4-7
868868
MSG1 = vsha256su0q_u32(MSG1, MSG2);
869869
TMP2 = STATE0;
870870
TMP0 = vaddq_u32(MSG2, vld1q_u32(&SHA256_K[0x08]));
871871
STATE0 = vsha256hq_u32(STATE0, STATE1, TMP1);
872872
STATE1 = vsha256h2q_u32(STATE1, TMP2, TMP1);
873-
MSG1 = vsha256su1q_u32(MSG1, MSG3, MSG0);;
873+
MSG1 = vsha256su1q_u32(MSG1, MSG3, MSG0);
874874

875875
// Rounds 8-11
876876
MSG2 = vsha256su0q_u32(MSG2, MSG3);
877877
TMP2 = STATE0;
878878
TMP1 = vaddq_u32(MSG3, vld1q_u32(&SHA256_K[0x0c]));
879879
STATE0 = vsha256hq_u32(STATE0, STATE1, TMP0);
880880
STATE1 = vsha256h2q_u32(STATE1, TMP2, TMP0);
881-
MSG2 = vsha256su1q_u32(MSG2, MSG0, MSG1);;
881+
MSG2 = vsha256su1q_u32(MSG2, MSG0, MSG1);
882882

883883
// Rounds 12-15
884884
MSG3 = vsha256su0q_u32(MSG3, MSG0);
885885
TMP2 = STATE0;
886886
TMP0 = vaddq_u32(MSG0, vld1q_u32(&SHA256_K[0x10]));
887887
STATE0 = vsha256hq_u32(STATE0, STATE1, TMP1);
888888
STATE1 = vsha256h2q_u32(STATE1, TMP2, TMP1);
889-
MSG3 = vsha256su1q_u32(MSG3, MSG1, MSG2);;
889+
MSG3 = vsha256su1q_u32(MSG3, MSG1, MSG2);
890890

891891
// Rounds 16-19
892892
MSG0 = vsha256su0q_u32(MSG0, MSG1);
893893
TMP2 = STATE0;
894894
TMP1 = vaddq_u32(MSG1, vld1q_u32(&SHA256_K[0x14]));
895895
STATE0 = vsha256hq_u32(STATE0, STATE1, TMP0);
896896
STATE1 = vsha256h2q_u32(STATE1, TMP2, TMP0);
897-
MSG0 = vsha256su1q_u32(MSG0, MSG2, MSG3);;
897+
MSG0 = vsha256su1q_u32(MSG0, MSG2, MSG3);
898898

899899
// Rounds 20-23
900900
MSG1 = vsha256su0q_u32(MSG1, MSG2);
901901
TMP2 = STATE0;
902902
TMP0 = vaddq_u32(MSG2, vld1q_u32(&SHA256_K[0x18]));
903903
STATE0 = vsha256hq_u32(STATE0, STATE1, TMP1);
904904
STATE1 = vsha256h2q_u32(STATE1, TMP2, TMP1);
905-
MSG1 = vsha256su1q_u32(MSG1, MSG3, MSG0);;
905+
MSG1 = vsha256su1q_u32(MSG1, MSG3, MSG0);
906906

907907
// Rounds 24-27
908908
MSG2 = vsha256su0q_u32(MSG2, MSG3);
909909
TMP2 = STATE0;
910910
TMP1 = vaddq_u32(MSG3, vld1q_u32(&SHA256_K[0x1c]));
911911
STATE0 = vsha256hq_u32(STATE0, STATE1, TMP0);
912912
STATE1 = vsha256h2q_u32(STATE1, TMP2, TMP0);
913-
MSG2 = vsha256su1q_u32(MSG2, MSG0, MSG1);;
913+
MSG2 = vsha256su1q_u32(MSG2, MSG0, MSG1);
914914

915915
// Rounds 28-31
916916
MSG3 = vsha256su0q_u32(MSG3, MSG0);
917917
TMP2 = STATE0;
918918
TMP0 = vaddq_u32(MSG0, vld1q_u32(&SHA256_K[0x20]));
919919
STATE0 = vsha256hq_u32(STATE0, STATE1, TMP1);
920920
STATE1 = vsha256h2q_u32(STATE1, TMP2, TMP1);
921-
MSG3 = vsha256su1q_u32(MSG3, MSG1, MSG2);;
921+
MSG3 = vsha256su1q_u32(MSG3, MSG1, MSG2);
922922

923923
// Rounds 32-35
924924
MSG0 = vsha256su0q_u32(MSG0, MSG1);
925925
TMP2 = STATE0;
926926
TMP1 = vaddq_u32(MSG1, vld1q_u32(&SHA256_K[0x24]));
927927
STATE0 = vsha256hq_u32(STATE0, STATE1, TMP0);
928928
STATE1 = vsha256h2q_u32(STATE1, TMP2, TMP0);
929-
MSG0 = vsha256su1q_u32(MSG0, MSG2, MSG3);;
929+
MSG0 = vsha256su1q_u32(MSG0, MSG2, MSG3);
930930

931931
// Rounds 36-39
932932
MSG1 = vsha256su0q_u32(MSG1, MSG2);
933933
TMP2 = STATE0;
934934
TMP0 = vaddq_u32(MSG2, vld1q_u32(&SHA256_K[0x28]));
935935
STATE0 = vsha256hq_u32(STATE0, STATE1, TMP1);
936936
STATE1 = vsha256h2q_u32(STATE1, TMP2, TMP1);
937-
MSG1 = vsha256su1q_u32(MSG1, MSG3, MSG0);;
937+
MSG1 = vsha256su1q_u32(MSG1, MSG3, MSG0);
938938

939939
// Rounds 40-43
940940
MSG2 = vsha256su0q_u32(MSG2, MSG3);
941941
TMP2 = STATE0;
942942
TMP1 = vaddq_u32(MSG3, vld1q_u32(&SHA256_K[0x2c]));
943943
STATE0 = vsha256hq_u32(STATE0, STATE1, TMP0);
944944
STATE1 = vsha256h2q_u32(STATE1, TMP2, TMP0);
945-
MSG2 = vsha256su1q_u32(MSG2, MSG0, MSG1);;
945+
MSG2 = vsha256su1q_u32(MSG2, MSG0, MSG1);
946946

947947
// Rounds 44-47
948948
MSG3 = vsha256su0q_u32(MSG3, MSG0);
949949
TMP2 = STATE0;
950950
TMP0 = vaddq_u32(MSG0, vld1q_u32(&SHA256_K[0x30]));
951951
STATE0 = vsha256hq_u32(STATE0, STATE1, TMP1);
952952
STATE1 = vsha256h2q_u32(STATE1, TMP2, TMP1);
953-
MSG3 = vsha256su1q_u32(MSG3, MSG1, MSG2);;
953+
MSG3 = vsha256su1q_u32(MSG3, MSG1, MSG2);
954954

955955
// Rounds 48-51
956956
TMP2 = STATE0;
957957
TMP1 = vaddq_u32(MSG1, vld1q_u32(&SHA256_K[0x34]));
958958
STATE0 = vsha256hq_u32(STATE0, STATE1, TMP0);
959-
STATE1 = vsha256h2q_u32(STATE1, TMP2, TMP0);;
959+
STATE1 = vsha256h2q_u32(STATE1, TMP2, TMP0);
960960

961961
// Rounds 52-55
962962
TMP2 = STATE0;
963963
TMP0 = vaddq_u32(MSG2, vld1q_u32(&SHA256_K[0x38]));
964964
STATE0 = vsha256hq_u32(STATE0, STATE1, TMP1);
965-
STATE1 = vsha256h2q_u32(STATE1, TMP2, TMP1);;
965+
STATE1 = vsha256h2q_u32(STATE1, TMP2, TMP1);
966966

967967
// Rounds 56-59
968968
TMP2 = STATE0;
969969
TMP1 = vaddq_u32(MSG3, vld1q_u32(&SHA256_K[0x3c]));
970970
STATE0 = vsha256hq_u32(STATE0, STATE1, TMP0);
971-
STATE1 = vsha256h2q_u32(STATE1, TMP2, TMP0);;
971+
STATE1 = vsha256h2q_u32(STATE1, TMP2, TMP0);
972972

973973
// Rounds 60-63
974974
TMP2 = STATE0;
975975
STATE0 = vsha256hq_u32(STATE0, STATE1, TMP1);
976-
STATE1 = vsha256h2q_u32(STATE1, TMP2, TMP1);;
976+
STATE1 = vsha256h2q_u32(STATE1, TMP2, TMP1);
977977

978978
// Add back to state
979979
STATE0 = vaddq_u32(STATE0, ABEF_SAVE);

simon.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ void SIMON64::Base::UncheckedSetKey(const byte *userKey, unsigned int keyLength,
294294
SIMON64_ExpandKey_4W(m_rkeys, m_wspace);
295295
break;
296296
default:
297-
CRYPTOPP_ASSERT(0);;
297+
CRYPTOPP_ASSERT(0);
298298
}
299299

300300
// Altivec loads the current subkey as a 16-byte vector
@@ -319,7 +319,7 @@ void SIMON64::Enc::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock,
319319
SIMON_Encrypt<word32, 44>(m_wspace+2, m_wspace+0, m_rkeys);
320320
break;
321321
default:
322-
CRYPTOPP_ASSERT(0);;
322+
CRYPTOPP_ASSERT(0);
323323
}
324324

325325
// Do the endian gyrations from the paper and align pointers
@@ -342,7 +342,7 @@ void SIMON64::Dec::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock,
342342
SIMON_Decrypt<word32, 44>(m_wspace+2, m_wspace+0, m_rkeys);
343343
break;
344344
default:
345-
CRYPTOPP_ASSERT(0);;
345+
CRYPTOPP_ASSERT(0);
346346
}
347347

348348
// Do the endian gyrations from the paper and align pointers
@@ -403,7 +403,7 @@ void SIMON128::Base::UncheckedSetKey(const byte *userKey, unsigned int keyLength
403403
SIMON128_ExpandKey_4W(m_rkeys, m_wspace);
404404
break;
405405
default:
406-
CRYPTOPP_ASSERT(0);;
406+
CRYPTOPP_ASSERT(0);
407407
}
408408
}
409409

@@ -425,7 +425,7 @@ void SIMON128::Enc::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock
425425
SIMON_Encrypt<word64, 72>(m_wspace+2, m_wspace+0, m_rkeys);
426426
break;
427427
default:
428-
CRYPTOPP_ASSERT(0);;
428+
CRYPTOPP_ASSERT(0);
429429
}
430430

431431
// Do the endian gyrations from the paper and align pointers
@@ -451,7 +451,7 @@ void SIMON128::Dec::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock
451451
SIMON_Decrypt<word64, 72>(m_wspace+2, m_wspace+0, m_rkeys);
452452
break;
453453
default:
454-
CRYPTOPP_ASSERT(0);;
454+
CRYPTOPP_ASSERT(0);
455455
}
456456

457457
// Do the endian gyrations from the paper and align pointers

speck.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ void SPECK64::Base::UncheckedSetKey(const byte *userKey, unsigned int keyLength,
274274
SPECK_ExpandKey_4W<word32, 27>(m_rkeys, m_wspace);
275275
break;
276276
default:
277-
CRYPTOPP_ASSERT(0);;
277+
CRYPTOPP_ASSERT(0);
278278
}
279279

280280
// Altivec loads the current subkey as a 16-byte vector
@@ -299,7 +299,7 @@ void SPECK64::Enc::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock,
299299
SPECK_Encrypt<word32, 27>(m_wspace+2, m_wspace+0, m_rkeys);
300300
break;
301301
default:
302-
CRYPTOPP_ASSERT(0);;
302+
CRYPTOPP_ASSERT(0);
303303
}
304304

305305
// Do the endian gyrations from the paper and align pointers
@@ -322,7 +322,7 @@ void SPECK64::Dec::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock,
322322
SPECK_Decrypt<word32, 27>(m_wspace+2, m_wspace+0, m_rkeys);
323323
break;
324324
default:
325-
CRYPTOPP_ASSERT(0);;
325+
CRYPTOPP_ASSERT(0);
326326
}
327327

328328
// Do the endian gyrations from the paper and align pointers
@@ -383,7 +383,7 @@ void SPECK128::Base::UncheckedSetKey(const byte *userKey, unsigned int keyLength
383383
SPECK_ExpandKey_4W<word64, 34>(m_rkeys, m_wspace);
384384
break;
385385
default:
386-
CRYPTOPP_ASSERT(0);;
386+
CRYPTOPP_ASSERT(0);
387387
}
388388
}
389389

@@ -405,7 +405,7 @@ void SPECK128::Enc::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock
405405
SPECK_Encrypt<word64, 34>(m_wspace+2, m_wspace+0, m_rkeys);
406406
break;
407407
default:
408-
CRYPTOPP_ASSERT(0);;
408+
CRYPTOPP_ASSERT(0);
409409
}
410410

411411
// Do the endian gyrations from the paper and align pointers
@@ -431,7 +431,7 @@ void SPECK128::Dec::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock
431431
SPECK_Decrypt<word64, 34>(m_wspace+2, m_wspace+0, m_rkeys);
432432
break;
433433
default:
434-
CRYPTOPP_ASSERT(0);;
434+
CRYPTOPP_ASSERT(0);
435435
}
436436

437437
// Do the endian gyrations from the paper and align pointers

validat2.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -998,7 +998,7 @@ bool TestIntegerOps()
998998
case 11:
999999
a = (m<<256)+1; break;
10001000
default:
1001-
;;
1001+
;
10021002
}
10031003

10041004
Integer x = a.InverseMod(m);

0 commit comments

Comments
 (0)