All of lore.kernel.org
 help / color / mirror / Atom feed
* [B.A.T.M.A.N.] [batctl] compiling with gcc 7.1.0: there are some notes and warnings
@ 2017-05-29 17:09 Philipp Psurek
  2017-06-01  8:34 ` Simon Wunderlich
  2017-06-13  8:25 ` [B.A.T.M.A.N.] [batctl] compiling with gcc 7.1.0: there are some notes and warnings Philipp Psurek
  0 siblings, 2 replies; 21+ messages in thread
From: Philipp Psurek @ 2017-05-29 17:09 UTC (permalink / raw)
  To: b.a.t.m.a.n

Hi all,

it's nothing to worry about but since 2011 I always noticed a clean
compile run of your code. Now with gcc 7.1.0 there are some warnings
and notes that might interest you:

~ LANG=C make
    CC bat-hosts.o
    CC debugfs.o
    CC debug.o
    CC functions.o
    CC genl.o
    CC hash.o
    CC icmp_helper.o
    CC interface.o
    CC ioctl.o
    CC main.o
    CC netlink.o
    CC ping.o
    CC sys.o
In file included from sys.c:37:0:
sys.c: In function 'handle_ra_setting':
sys.h:33:25: warning: '%s' directive output may be truncated writing up to 255 bytes into a region of size 185 [-Wformat-truncation=]
 #define SYS_IFACE_PATH  "/sys/class/net"
                         ^
sys.h:38:30: note: in expansion of macro 'SYS_IFACE_PATH'
 #define SYS_ROUTING_ALGO_FMT SYS_IFACE_PATH"/%s/mesh/routing_algo"
                              ^~~~~~~~~~~~~~
sys.c:480:38: note: in expansion of macro 'SYS_ROUTING_ALGO_FMT'
   snprintf(path_buff, PATH_BUFF_LEN, SYS_ROUTING_ALGO_FMT, iface_dir->d_name);
                                      ^~~~~~~~~~~~~~~~~~~~
sys.h:38:46: note: format string is defined here
 #define SYS_ROUTING_ALGO_FMT SYS_IFACE_PATH"/%s/mesh/routing_algo"
                                              ^~
sys.c:480:3: note: 'snprintf' output between 34 and 289 bytes into a destination of size 200
   snprintf(path_buff, PATH_BUFF_LEN, SYS_ROUTING_ALGO_FMT, iface_dir->d_name);
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    CC tcpdump.o
    CC tp_meter.o
tp_meter.c: In function 'tp_meter':
tp_meter.c:502:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
   printf("CANCEL received: test aborted\n");
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tp_meter.c:504:2: note: here
  case BATADV_TP_REASON_COMPLETE:
  ^~~~
    CC traceroute.o
    CC translate.o
    LD batctl

# batctl -v
batctl 2017.1-1-g3069ca8 [batman-adv: 2017.1-4-g2149d80d]

It's really nothing bad at all. gcc 7.1.0 is somehow a little bit
capricious but with more suggestions to make cleaner code.

best regards

Philipp

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2017-06-13 12:25 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-29 17:09 [B.A.T.M.A.N.] [batctl] compiling with gcc 7.1.0: there are some notes and warnings Philipp Psurek
2017-06-01  8:34 ` Simon Wunderlich
2017-06-03  2:14   ` Philipp Psurek
2017-06-03  3:12   ` [B.A.T.M.A.N.] [PATCH] batctl: suppress implicit-fallthrough compiler warning Philipp Psurek
2017-06-03 10:13     ` Philipp Psurek
2017-06-03 10:31       ` Philipp Psurek
2017-06-03  3:40   ` [B.A.T.M.A.N.] [PATCH] batctl: change PATH_BUFF_LEN to maximal possible value Philipp Psurek
2017-06-13  8:25 ` [B.A.T.M.A.N.] [batctl] compiling with gcc 7.1.0: there are some notes and warnings Philipp Psurek
2017-06-13  8:25   ` [B.A.T.M.A.N.] [PATCH 1/2] batctl: change PATH_BUFF_LEN to maximal possible value Philipp Psurek
2017-06-13  8:49     ` Simon Wunderlich
2017-06-13  8:26   ` [B.A.T.M.A.N.] [PATCH 2/2] batctl: suppress implicit-fallthrough compiler warning Philipp Psurek
2017-06-13  8:48     ` Simon Wunderlich
2017-06-13 10:39       ` [B.A.T.M.A.N.] [PATCH 2/2] batctl: suppress implicit-fallthrough compiler Philipp Psurek
2017-06-13 10:39         ` [B.A.T.M.A.N.] [PATCH] batctl: suppress implicit-fallthrough compiler warning Philipp Psurek
2017-06-13 11:08         ` [B.A.T.M.A.N.] [PATCH 2/2] " Philipp Psurek
2017-06-13 11:08           ` [B.A.T.M.A.N.] [PATCH] " Philipp Psurek
2017-06-13 11:46             ` Simon Wunderlich
2017-06-13 11:53               ` Sven Eckelmann
2017-06-13 11:55                 ` Sven Eckelmann
2017-06-13 12:25                   ` Philipp Psurek
2017-06-13  8:42   ` [B.A.T.M.A.N.] [batctl] compiling with gcc 7.1.0: there are some notes and warnings Simon Wunderlich

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.