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

add clang support along with gcc #4

Merged
merged 2 commits into from
Feb 3, 2024
Merged

add clang support along with gcc #4

merged 2 commits into from
Feb 3, 2024

Conversation

vjardin
Copy link
Contributor

@vjardin vjardin commented Feb 3, 2024

Since clang is pretty aggressive, it allows to detect some weird cases such as:

gtp_ppp.c:1994:14: warning: implicit conversion from 'int' to 'char' changes value from 129 to -127 [-Wconstant-conversion]
                opt[i++] = IPCP_OPT_PRIMDNS;
                         ~ ^~~~~~~~~~~~~~~~
include/gtp_ppp.h:65:26: note: expanded from macro 'IPCP_OPT_PRIMDNS'
#define IPCP_OPT_PRIMDNS        129     /* primary remote dns address */
                                ^~~

TODO: if this pull request is accepted, I will (1) try to fix the issues raised by clang and then (2) extend the compilation tests to run with both gcc and clang.

Add support for:
  CC=clang make
set clang env before running make.
@acassen acassen merged commit e477e4f into acassen:main Feb 3, 2024
@vjardin vjardin deleted the clang branch February 3, 2024 07:31
acassen added a commit that referenced this pull request Mar 18, 2024
VTY interface via 'show ip vrf'

gtp-guard> sh ip vrf
vrf(1): vrf-name-1 (VRF-Description-here)
 PPPoE: interface br-lab (ifindex:16) sessions:0
  Discovery channel:
   #00: rx_packets:0 rx_bytes:0 tx_packets:0 tx_bytes:0
   #1: rx_packets:0 rx_bytes:0 tx_packets:0 tx_bytes:0
   #2: rx_packets:0 rx_bytes:0 tx_packets:0 tx_bytes:0
   #3: rx_packets:0 rx_bytes:0 tx_packets:0 tx_bytes:0
   #4: rx_packets:0 rx_bytes:0 tx_packets:0 tx_bytes:0
   #5: rx_packets:0 rx_bytes:0 tx_packets:0 tx_bytes:0
   #6: rx_packets:0 rx_bytes:0 tx_packets:0 tx_bytes:0
   #7: rx_packets:0 rx_bytes:0 tx_packets:0 tx_bytes:0
  Session channel:
   #00: rx_packets:0 rx_bytes:0 tx_packets:0 tx_bytes:0
   #1: rx_packets:0 rx_bytes:0 tx_packets:0 tx_bytes:0
   #2: rx_packets:0 rx_bytes:0 tx_packets:0 tx_bytes:0
   #3: rx_packets:0 rx_bytes:0 tx_packets:0 tx_bytes:0
   #4: rx_packets:0 rx_bytes:0 tx_packets:0 tx_bytes:0
   #5: rx_packets:0 rx_bytes:0 tx_packets:0 tx_bytes:0
   #6: rx_packets:0 rx_bytes:0 tx_packets:0 tx_bytes:0
   #7: rx_packets:0 rx_bytes:0 tx_packets:0 tx_bytes:0
@vjardin vjardin restored the clang branch April 30, 2024 05:59
@vjardin vjardin deleted the clang branch April 30, 2024 07:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants