]> The Tcpdump Group git mirrors - tcpdump/commit
PTP: Declare 'static' some variables
authorFrancois-Xavier Le Bail <[email protected]>
Fri, 29 May 2020 21:41:45 +0000 (23:41 +0200)
committerFrancois-Xavier Le Bail <[email protected]>
Fri, 29 May 2020 22:05:32 +0000 (00:05 +0200)
commitea4e272785eb3a1aab6ac148f178439c86aa68ae
tree80e130e11c05d79c569f2574f6c0fc530c13cb52
parent0181656313fbe514928263f4061d42d338a5bb7c
PTP: Declare 'static' some variables

Fix warnings given by '-Wmissing-variable-declarations':

./print-ptp.c:262:13: warning: no previous extern declaration for
non-static variable 'p_porigin_ts' [-Wmissing-variable-declarations]
const char *p_porigin_ts = "preciseOriginTimeStamp";
            ^
./print-ptp.c:262:7: note: declare 'static' if the variable is not
intended to be used outside of this translation unit
const char *p_porigin_ts = "preciseOriginTimeStamp";
      ^
./print-ptp.c:263:13: warning: no previous extern declaration for
non-static variable 'p_origin_ts' [-Wmissing-variable-declarations]
const char *p_origin_ts = "originTimeStamp";
            ^
./print-ptp.c:263:7: note: declare 'static' if the variable is not
intended to be used outside of this translation unit
const char *p_origin_ts = "originTimeStamp";
      ^
./print-ptp.c:264:13: warning: no previous extern declaration for
non-static variable 'p_recv_ts' [-Wmissing-variable-declarations]
const char *p_recv_ts = "receiveTimeStamp";
            ^
./print-ptp.c:264:7: note: declare 'static' if the variable is not
intended to be used outside of this translation unit
const char *p_recv_ts = "receiveTimeStamp";

Moreover:
Put a function definition name at the beginning of the line.
print-ptp.c