Wireshark-commits: [Wireshark-commits] master ff9f9fc: Don't include "file.h" if you don't need it.

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Wed, 4 Nov 2015 08:46:39 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=ff9f9fc43162f3271e8335aae9b03175a0f2e7ee
Submitter: Guy Harris (guy@xxxxxxxxxxxx)
Changed: branch: master
Repository: wireshark

Commits:

ff9f9fc by Guy Harris (guy@xxxxxxxxxxxx):

    Don't include "file.h" if you don't need it.
    
    It ends up dragging in libwireshark headers, which programs not linking
    with libwireshark shouldn't do.  In particular, including
    <epan/address.h> causes some functions that refer to libwireshark
    functions to be defined if the compiler doesn't handle "static inline"
    the way GCC does, and you end up requiring libwireshark even though you
    shouldn't require it.
    
    Move plurality() to wsutil/str_util.h, so that non-libwireshark code can
    get it without include epan/packet.h.  Fix includes as necessary.
    
    Change-Id: Ie4819719da4c2b349f61445112aa419e99b977d3
    Reviewed-on: https://code.wireshark.org/review/11545
    Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
    

Actions performed:

    from  321934f   MPTCP: Use copy_address_wmem() instead of copy_address()
    adds  ff9f9fc   Don't include "file.h" if you don't need it.


Summary of changes:
 asn1/idmp/packet-idmp-template.c         |    2 ++
 asn1/kerberos/packet-kerberos-template.c |    1 +
 asn1/ldap/packet-ldap-template.c         |    1 +
 asn1/lte-rrc/packet-lte-rrc-template.c   |    2 ++
 asn1/rtse/packet-rtse-template.c         |    2 ++
 capture_opts.c                           |    2 ++
 dumpcap.c                                |    1 +
 editcap.c                                |    1 +
 epan/dissectors/file-file.c              |    1 +
 epan/dissectors/file-gif.c               |    3 ++-
 epan/dissectors/packet-ansi_a.c          |    3 ++-
 epan/dissectors/packet-asap.c            |    2 ++
 epan/dissectors/packet-auto_rp.c         |    2 ++
 epan/dissectors/packet-bgp.c             |    2 +-
 epan/dissectors/packet-bootp.c           |    1 +
 epan/dissectors/packet-bssap.c           |    1 +
 epan/dissectors/packet-collectd.c        |    2 ++
 epan/dissectors/packet-cops.c            |    4 +++-
 epan/dissectors/packet-daap.c            |    1 +
 epan/dissectors/packet-data.c            |    1 +
 epan/dissectors/packet-dccp.c            |    1 +
 epan/dissectors/packet-dcerpc.c          |    1 +
 epan/dissectors/packet-dhcpv6.c          |    1 +
 epan/dissectors/packet-dmp.c             |    2 ++
 epan/dissectors/packet-dnp.c             |    1 +
 epan/dissectors/packet-dtls.c            |    1 +
 epan/dissectors/packet-dua.c             |    1 +
 epan/dissectors/packet-ecp-oui.c         |    4 +++-
 epan/dissectors/packet-enrp.c            |    2 ++
 epan/dissectors/packet-evrc.c            |    1 +
 epan/dissectors/packet-frame.c           |    1 +
 epan/dissectors/packet-gsm_a_bssmap.c    |    2 ++
 epan/dissectors/packet-gsm_a_common.c    |    1 +
 epan/dissectors/packet-iax2.c            |    2 ++
 epan/dissectors/packet-idmp.c            |   12 +++++++-----
 epan/dissectors/packet-ieee80211.c       |    1 +
 epan/dissectors/packet-igmp.c            |    1 +
 epan/dissectors/packet-ip.c              |    1 +
 epan/dissectors/packet-ipars.c           |    1 +
 epan/dissectors/packet-ipv6.c            |    1 +
 epan/dissectors/packet-isakmp.c          |    1 +
 epan/dissectors/packet-iua.c             |    1 +
 epan/dissectors/packet-kerberos.c        |   14 ++++++++------
 epan/dissectors/packet-ldap.c            |   13 +++++++------
 epan/dissectors/packet-lte-rrc.c         |   16 +++++++++-------
 epan/dissectors/packet-m2tp.c            |    2 ++
 epan/dissectors/packet-m2ua.c            |    2 ++
 epan/dissectors/packet-m3ua.c            |    1 +
 epan/dissectors/packet-media.c           |    2 ++
 epan/dissectors/packet-mip6.c            |    2 ++
 epan/dissectors/packet-mtp3mg.c          |    2 ++
 epan/dissectors/packet-ndmp.c            |    1 +
 epan/dissectors/packet-netflow.c         |    1 +
 epan/dissectors/packet-nfs.c             |    1 +
 epan/dissectors/packet-ntlmssp.c         |    1 +
 epan/dissectors/packet-ositp.c           |    1 +
 epan/dissectors/packet-ossp.c            |    2 ++
 epan/dissectors/packet-p_mul.c           |    2 ++
 epan/dissectors/packet-per.c             |    1 +
 epan/dissectors/packet-pop.c             |    1 +
 epan/dissectors/packet-ppi.c             |    1 +
 epan/dissectors/packet-ppp.c             |    1 +
 epan/dissectors/packet-pw-atm.c          |    2 ++
 epan/dissectors/packet-pw-common.c       |    1 +
 epan/dissectors/packet-q2931.c           |    1 +
 epan/dissectors/packet-rpc.c             |    1 +
 epan/dissectors/packet-rpcap.c           |    1 +
 epan/dissectors/packet-rtse.c            |   12 +++++++-----
 epan/dissectors/packet-sccp.c            |    1 +
 epan/dissectors/packet-scsi-ssc.c        |    1 +
 epan/dissectors/packet-sctp.c            |    1 +
 epan/dissectors/packet-ses.c             |    2 ++
 epan/dissectors/packet-sml.c             |    2 ++
 epan/dissectors/packet-smtp.c            |    1 +
 epan/dissectors/packet-ssl.c             |    1 +
 epan/dissectors/packet-sua.c             |    2 ++
 epan/dissectors/packet-tcp.c             |    3 ++-
 epan/dissectors/packet-uts.c             |    1 +
 epan/dissectors/packet-v5ua.c            |    2 ++
 epan/dissectors/packet-wsp.c             |    2 ++
 epan/packet.c                            |    2 ++
 epan/packet.h                            |    3 ---
 epan/reassemble.c                        |    2 ++
 ringbuffer.h                             |    1 -
 tshark.c                                 |    3 ++-
 ui/capture.c                             |    1 +
 ui/gtk/expert_comp_dlg.c                 |    1 +
 ui/gtk/export_sslkeys.c                  |    1 +
 ui/gtk/fileset_dlg.c                     |    2 +-
 ui/gtk/packet_panes.c                    |    1 +
 ui/gtk/voip_calls_dlg.c                  |    3 ++-
 wsutil/str_util.h                        |    3 +++
 92 files changed, 160 insertions(+), 42 deletions(-)