File: 1080-no-cpp-register.patch

package info (click to toggle)
pchar 1.5-8
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,056 kB
  • sloc: cpp: 13,194; sh: 2,510; makefile: 765
file content (21 lines) | stat: -rw-r--r-- 698 bytes parent folder | download
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)  {