File: 080_fix-build-with-GCC-15.patch

package info (click to toggle)
scalpel 1.60%2Bgit20240110.6960eb2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 560 kB
  • sloc: ansic: 4,990; makefile: 90
file content (48 lines) | stat: -rw-r--r-- 1,364 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
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
Description: Fix build with GCC-15
Forwarded: https://github.com/nolaforensix/scalpel-1.60/pull/1
Author: Matheus Polkorny <mpolkorny@gmail.com>
---
 helpers.c | 2 +-
 scalpel.c | 2 +-
 scalpel.h | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/helpers.c b/helpers.c
index 106e7bf..4132e6a 100644
--- a/helpers.c
+++ b/helpers.c
@@ -342,7 +342,7 @@ void handleError(struct scalpelState *state, int error) {
 }
 
 
-void setttywidth(){
+void setttywidth(int sig){
 #if defined (__WIN32)
   CONSOLE_SCREEN_BUFFER_INFO csbi;  
   HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
diff --git a/scalpel.c b/scalpel.c
index e7e71fc..c4dffa3 100644
--- a/scalpel.c
+++ b/scalpel.c
@@ -623,7 +623,7 @@ int main(int argc, char **argv) {
     exit(-1);
   }
 
-  setttywidth();
+  setttywidth(0);
 
   argv += optind;
   if (*argv != NULL || state.useInputFileList) {
diff --git a/scalpel.h b/scalpel.h
index cebabb7..bd5200a 100644
--- a/scalpel.h
+++ b/scalpel.h
@@ -344,7 +344,7 @@ char *bm_needleinhaystack(char *needle, size_t needle_len,
                           size_t table[UCHAR_MAX + 1], int casesensitive);
 int translate(char *str);
 char *skipWhiteSpace(char *str);
-void setttywidth();
+void setttywidth(int sig);
 
 // prototypes for visible files.c functions
 unsigned long long measureOpenFile(FILE *f, struct scalpelState *state);