Project

General

Profile

Actions

Bug #3867

closed

windows: compile warnings

Added by Victor Julien over 3 years ago. Updated 11 months ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
Affected Versions:
Effort:
Difficulty:
Label:

Description

A recent mingw update triggered lots of warnings:

In file included from alert-debuglog.c:45:
alert-debuglog.c: In function 'AlertDebugLogger':
alert-debuglog.c:169:43: warning: unknown conversion type character 'l' in format [-Wformat=]
  169 |         MemBufferWriteString(aft->buffer, "PCAP PKT NUM:      %"PRIu64"\n", p->pcap_cnt);
      |                                           ^~~~~~~~~~~~~~~~~~~~~~
util-buffer.h:165:27: note: in definition of macro 'MemBufferWriteString'
  165 |                           __VA_ARGS__);                                 \
      |                           ^~~~~~~~~~~
alert-debuglog.c:169:43: warning: too many arguments for format [-Wformat-extra-args]
  169 |         MemBufferWriteString(aft->buffer, "PCAP PKT NUM:      %"PRIu64"\n", p->pcap_cnt);
      |                                           ^~~~~~~~~~~~~~~~~~~~~~
util-buffer.h:165:27: note: in definition of macro 'MemBufferWriteString'
  165 |                           __VA_ARGS__);                                 \
      |                           ^~~~~~~~~~~
alert-debuglog.c:209:43: warning: unknown conversion type character 'l' in format [-Wformat=]
  209 |         MemBufferWriteString(aft->buffer, "FLOW PKTS TODST:   %"PRIu32"\n" 
      |                                           ^~~~~~~~~~~~~~~~~~~~~~
util-buffer.h:165:27: note: in definition of macro 'MemBufferWriteString'
  165 |                           __VA_ARGS__);                                 \
      |                           ^~~~~~~~~~~
alert-debuglog.c:209:43: warning: too many arguments for format [-Wformat-extra-args]
  209 |         MemBufferWriteString(aft->buffer, "FLOW PKTS TODST:   %"PRIu32"\n" 
      |                                           ^~~~~~~~~~~~~~~~~~~~~~
util-buffer.h:165:27: note: in definition of macro 'MemBufferWriteString'
  165 |                           __VA_ARGS__);                                 \
      |                           ^~~~~~~~~~~
alert-debuglog.c:269:21: warning: unknown conversion type character 'l' in format [-Wformat=]
  269 |                     "ALERT IN TX [%02d]:    %"PRIu64"\n", i, pa->tx_id);
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~
util-buffer.h:165:27: note: in definition of macro 'MemBufferWriteString'
  165 |                           __VA_ARGS__);                                 \
      |                           ^~~~~~~~~~~
alert-debuglog.c:269:21: warning: too many arguments for format [-Wformat-extra-args]
  269 |                     "ALERT IN TX [%02d]:    %"PRIu64"\n", i, pa->tx_id);
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~
util-buffer.h:165:27: note: in definition of macro 'MemBufferWriteString'
  165 |                           __VA_ARGS__);                                 \
      |                           ^~~~~~~~~~~

Compiler is Gcc 10.1.0.


Files

allout.txt (188 KB) allout.txt Peter Manev, 11/04/2020 11:07 AM
Actions #1

Updated by Victor Julien over 3 years ago

  • Target version changed from 6.0.0rc1 to 6.0.1
Actions #2

Updated by Victor Julien over 3 years ago

  • Status changed from New to Assigned
  • Assignee set to Victor Julien
Actions #3

Updated by Peter Manev over 3 years ago

Have a more complete list I meant to upload.
Please find attached.

Actions #4

Updated by Victor Julien over 3 years ago

Peter can you try again with the git master? It seems fixed in CI, but not in my local setup.

Actions #5

Updated by Peter Manev over 3 years ago

running it now on fresh 2019 Server setup - seems i got stuck on cbindgen

checking for ./rust/dist/rust-bindings.h... no
checking for ./rust/gen/rust-bindings.h... no
checking for cbindgen... no
  Warning: cbindgen too old or not found, it is required to
      generate header files.
  To install: cargo install --force cbindgen
configure: error: cbindgen required


Did i miss something ?

Actions #6

Updated by Peter Manev over 3 years ago

I missed

cargo install -f cbindgen --root /usr/

Actions #7

Updated by Peter Manev over 3 years ago

I can confirm no more warnings with

# src/.libs/suricata -V
[2624] 6/11/2020 -- 13:17:26 - (win32-service.c:54) <Info> (SCRunningAsService) -- Running as service: no
This is Suricata version 6.0.1-dev (2ede73611 2020-11-04)

Actions #8

Updated by Victor Julien over 3 years ago

  • Target version changed from 6.0.1 to 6.0.2

While it seems to have improved, I still get some of these warnings. So leaving the ticket open for now.

Actions #9

Updated by Victor Julien about 3 years ago

  • Target version changed from 6.0.2 to 7.0.0-beta1
Actions #10

Updated by Victor Julien almost 2 years ago

  • Status changed from Assigned to New
  • Assignee deleted (Victor Julien)
Actions #11

Updated by Victor Julien over 1 year ago

  • Target version changed from 7.0.0-beta1 to 8.0.0-beta1
Actions #12

Updated by Victor Julien 11 months ago

  • Assignee set to Victor Julien
Actions #13

Updated by Victor Julien 11 months ago

  • Status changed from New to Closed
  • Assignee deleted (Victor Julien)
  • Target version deleted (8.0.0-beta1)

No longer seeing these in master and master-6.0.x

Actions

Also available in: Atom PDF