1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
Description: Drop no longer available register specifier from test code.
Fixes this compiler warning:
.
Pctest.cc: In member function 'u_short Pctest::InCksum(u_short*, int)':
Pctest.cc:201:18: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
201 | register int sum = 0;
| ^~~
Author: Petter Reinholdtsen <pere@debian.org>
Forwarded: no
Last-Update: 2026-03-14
--- pchar-1.5.orig/Pctest.cc
+++ pchar-1.5/Pctest.cc
@@ -198,7 +198,7 @@ char *Pctest::GeneratePayload(int size)
u_short
Pctest::InCksum(u_short *addr, int len)
{
- register int sum = 0;
+ int sum = 0;
u_short checksum;
while (len > 1) {
|