bugGNU cflow - Bugs: bug #66413, local static structures with same...

 
 

bug #66413: local static structures with same name in two different c-source files cause error "XXX redefined"

Submitter:  Jim Hanley <dgtlrift>
Submitted:  Wed 06 Nov 2024 02:29:40 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 06 Nov 2024 02:29:40 PM UTC, original submission:  

Steps to reproduce:

clone git repo for iwd project

git clone https://git.kernel.org/pub/scm/network/wireless/iwd.git


modify Makefile.am to add rule for cflow

flowcharts:     src/iwd.cflow

EXTRA_DIST += src/iwd.cflow

CFLOW_FLAGS=-i^s

src_iwd_CFLOW_INPUT=$(filter %.c,$(src_iwd_SOURCES))
src/iwd.cflow: $(src_iwd_CFLOW_INPUT) src/iwd.rc Makefile src/iwd
        CFLOWRC=src/iwd.rc \
         cflow -osrc_iwd.cflow $(CFLOW_FLAGS) $(DEFS) \
                    $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
                    $(CPPFLAGS) \
         $(src_iwd_CFLOW_INPUT)


build flowcharts rule

default@buildsvr:~/projects/Output-buildroot/linux-dev/output-arm_overlay/build/iwd-20241105-145540$ make flowcharts 2>&1
CFLOWRC=src/iwd.rc \
 cflow -osrc_iwd.cflow -i^s -DHAVE_CONFIG_H \
                    -I.   \
            -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  \
         src/main.c src/netdev.c src/wiphy.c src/device.c src/station.c src/ie.c src/dbus.c src/mpdu.c src/eapol.c src/eapolutil.c src/handshake.c src/scan.c src/common.c src/agent.c src/survey.c src/storage.c src/network.c src/wsc.c src/backtrace.c src/knownnetworks.c src/rfkill.c src/ft.c src/ap.c src/adhoc.c src/sae.c src/nl80211util.c src/nl80211cmd.c src/owe.c src/blacklist.c src/manager.c src/erp.c src/fils.c src/anqp.c src/anqputil.c src/netconfig.c src/netconfig-commit.c src/resolve.c src/hotspot.c src/p2p.c src/p2putil.c src/module.c src/rrm.c src/frame-xchg.c src/eap-wsc.c src/wscutil.c src/diagnostic.c src/ip-pool.c src/band.c src/sysfs.c src/offchannel.c src/dpp-util.c src/json.c src/dpp.c src/udev.c src/eap.c src/eap-md5.c src/eap-tls.c src/eap-ttls.c src/eap-mschapv2.c src/eap-sim.c src/eap-aka.c src/eap-peap.c src/eap-gtc.c src/eap-pwd.c src/util.c src/crypto.c src/simutil.c src/simauth.c src/watchlist.c src/eap-tls-common.c src/mschaputil.c
cflow:src/eap-ttls.c:982: method_ops redefined
cflow:src/resolve.c:605: this is the place of previous definition
default@buildsvr:~/projects/Output-buildroot/linux-dev/output-arm_overlay/build/iwd-20241105-145540$


contents of two files with sections called out:

src/eap-ttls.c

 979
   980  static const struct {
   981          const char *name;
   982          const struct phase2_method_ops *method_ops;
   983  } tunneled_non_eap_method_ops[] = {
   984          { "Tunneled-CHAP", &phase2_chap_ops },
   985          { "Tunneled-MSCHAP", &phase2_mschap_ops },
   986          { "Tunneled-MSCHAPv2", &phase2_mschapv2_ops },
   987          { "Tunneled-PAP", &phase2_pap_ops },
   988          { }
   989  };
   990


src/resolve.c

   602
   603  static const struct {
   604          const char *name;
   605          const struct resolve_method_ops *method_ops;
   606  } resolve_method_ops_list[] = {
   607          { "systemd", &resolve_method_systemd_ops },
   608          { "resolvconf", &resolve_method_resolvconf_ops },
   609          { "none", &resolve_method_none_ops },
   610          { }
   611  };
   612



Jim Hanley <dgtlrift>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by dgtlrift (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.14-f13d.
    Corresponding source code