Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] libopts compiler warnings #658

Closed
fklassen opened this issue Apr 25, 2021 · 1 comment
Closed

[Bug] libopts compiler warnings #658

fklassen opened this issue Apr 25, 2021 · 1 comment
Assignees

Comments

@fklassen
Copy link
Member

Describe the bug
Getting many libopts compiler warnings on Debian Buster

To Reproduce
Steps to reproduce the behavior:

  1. make maintainer-clean
  2. ./autogen.sh
  3. ./configure
  4. make

Expected behavior
no warnings

Screenshots

In file included from libopts.c:32:
makeshell.c: In function ‘text_to_var’:
makeshell.c:324:14: warning: this statement may fall through [-Wimplicit-fallthrough=]
             (*(opts->pUsageProc))(opts, EXIT_SUCCESS);
             ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
makeshell.c:327:9: note: here
         case TT_USAGE:
         ^~~~
makeshell.c:328:14: warning: this statement may fall through [-Wimplicit-fallthrough=]
             (*(opts->pUsageProc))(opts, EXIT_FAILURE);
             ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
makeshell.c:331:9: note: here
         case TT_VERSION:
         ^~~~
makeshell.c:337:13: warning: this statement may fall through [-Wimplicit-fallthrough=]
             optionPrintVersion(opts, od);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
makeshell.c:340:9: note: here
         default:
         ^~~~~~~
makeshell.c: In function ‘genshelloptUsage’:
makeshell.c:887:9: warning: this statement may fall through [-Wimplicit-fallthrough=]
         optionUsage(opts, EXIT_FAILURE);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
makeshell.c:890:5: note: here
     case 0:
     ^~~~
makeshell.c:932:9: warning: this statement may fall through [-Wimplicit-fallthrough=]
         optionUsage(optionParseShellOptions, EXIT_FAILURE);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
makeshell.c:934:5: note: here
     default:
     ^~~~~~~
In file included from libopts.c:34:
numeric.c: In function ‘optionNumericVal’:
numeric.c:139:24: warning: this statement may fall through [-Wimplicit-fallthrough=]
         case 't':  val *= 1000;
                    ~~~~^~~~~~~
numeric.c:140:9: note: here
         case 'g':  val *= 1000;
         ^~~~
numeric.c:140:24: warning: this statement may fall through [-Wimplicit-fallthrough=]
         case 'g':  val *= 1000;
                    ~~~~^~~~~~~
numeric.c:141:9: note: here
         case 'm':  val *= 1000;
         ^~~~
numeric.c:141:24: warning: this statement may fall through [-Wimplicit-fallthrough=]
         case 'm':  val *= 1000;
                    ~~~~^~~~~~~
numeric.c:142:9: note: here
         case 'k':  val *= 1000; break;
         ^~~~
numeric.c:144:24: warning: this statement may fall through [-Wimplicit-fallthrough=]
         case 'T':  val *= 1024;
                    ~~~~^~~~~~~
numeric.c:145:9: note: here
         case 'G':  val *= 1024;
         ^~~~
numeric.c:145:24: warning: this statement may fall through [-Wimplicit-fallthrough=]
         case 'G':  val *= 1024;
                    ~~~~^~~~~~~
numeric.c:146:9: note: here
         case 'M':  val *= 1024;
         ^~~~
numeric.c:146:24: warning: this statement may fall through [-Wimplicit-fallthrough=]
         case 'M':  val *= 1024;
                    ~~~~^~~~~~~
numeric.c:147:9: note: here
         case 'K':  val *= 1024; break;
         ^~~~
  CCLD     libopts.la
libtool: warning: '-version-info/-version-number' is ignored for convenience libraries
ar: `u' modifier ignored since `D'

System (please complete the following information):

  • OS: Linux
  • Debian 10 (Buster)
  • Tcpreplay 4.3.3 Beta1

Additional context

Warning in interface.c:get_interface_list() line 93:
May need to run as root to get access to all network interfaces.
tcpreplay version: 4.3.4-beta2 (build git:v4.3.4-beta1-7-g90c07cfb) (debug)
Copyright 2013-2018 by Fred Klassen <tcpreplay at appneta dot com> - AppNeta
Copyright 2000-2012 by Aaron Turner <aturner at synfin dot net>
The entire Tcpreplay Suite is licensed under the GPLv3
Cache file supported: 04
Not compiled with libdnet.
Compiled against libpcap: 1.8.1
64 bit packet counters: enabled
Verbose printing via tcpdump: enabled
Packet editing: disabled
Fragroute engine: disabled
Default injection method: PF_PACKET send()
Optional injection method: netmap
@fklassen fklassen self-assigned this Apr 25, 2021
fklassen added a commit that referenced this issue Apr 25, 2021
fklassen added a commit that referenced this issue Apr 25, 2021
@fklassen fklassen changed the title [Bug] [Bug] libopts compiler warnings Apr 25, 2021
@fklassen
Copy link
Member Author

Fixed in PR #659

@appneta appneta locked as resolved and limited conversation to collaborators May 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant