Project

General

Profile

Actions

Bug #3867

open

windows: compile warnings

Added by Victor Julien about 1 year ago. Updated 7 months ago.

Status:
Assigned
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 about 1 year ago

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

Updated by Victor Julien 11 months ago

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

Updated by Peter Manev 11 months ago

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

Actions #4

Updated by Victor Julien 10 months 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 10 months 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 10 months ago

I missed

cargo install -f cbindgen --root /usr/

Actions #7

Updated by Peter Manev 10 months 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 10 months 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 7 months ago

  • Target version changed from 6.0.2 to 7.0rc1
Actions

Also available in: Atom PDF