Skip to content

Commit

Permalink
Constify two arguments to address more warnings.
Browse files Browse the repository at this point in the history
gcc (2023_08_10) 13.3.0

sn_analyse.c:53:51: warning: passing argument 3 of 'sbuf_update'
  discards 'const' qualifier from pointer target type
  [-Wdiscarded-qualifiers]
sn_analyse.c:83:52: warning: passing argument 3 of 'record_buf'
  discards 'const' qualifier from pointer target type
  [-Wdiscarded-qualifiers]
sn_analyse.c:95:54: warning: passing argument 3 of 'record_buf'
  discards 'const' qualifier from pointer target type
  [-Wdiscarded-qualifiers]
sn_analyse.c:117:51: warning: passing argument 3 of 'sbuf_update'
  discards 'const' qualifier from pointer target type
  [-Wdiscarded-qualifiers]
  • Loading branch information
infrastation committed Sep 22, 2024
1 parent 485de9b commit 347bd0e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sniffit.c
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ search_dynam (char *file, char ptype)
/* Type 0: TELNET */
static void
record_buf (struct file_info *dummy_pointer, _32_bit cur_seq_nr,
char *data, int len, int type)
const char *data, int len, int type)
{
int i, j, noloop = 0;

Expand Down Expand Up @@ -414,7 +414,7 @@ sb_shift (struct file_info *dummy_pointer)

static void
sbuf_update (struct file_info *dummy_pointer, _32_bit cur_seq_nr,
char *data, int len)
const char *data, int len)
{
int i;

Expand Down

0 comments on commit 347bd0e

Please sign in to comment.