git: c58efaec2192 - stable/13 - ngatm: Fix mismatches between function definitions and prototypes

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Sat, 30 Nov 2024 19:09:05 UTC
The branch stable/13 has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=c58efaec21926b960ed76f0d4a02794fc858a662

commit c58efaec21926b960ed76f0d4a02794fc858a662
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2024-11-30 18:07:30 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2024-11-30 18:25:00 +0000

    ngatm: Fix mismatches between function definitions and prototypes
    
    This is a direct commit to stable/13 (ngatm was removed in 14.0) to
    fix warnings reported by GCC 13 such as:
    
    /freebsd/stable/13/sys/contrib/ngatm/netnatm/sig/sig_reset.c:82:1: error: conflicting types for 'uni_sig_start' due to enum/integer mismatch; have 'void(struct uni *, u_int,  uint32_t,  struct uni_msg *, struct uni_all *)' {aka 'void(struct uni *, unsigned int,  unsigned int,  struct uni_msg *, struct uni_all *)'} [-Werror=enum-int-mismatch]
       82 | uni_sig_start(struct uni *uni, u_int sig, uint32_t cookie,
          | ^~~~~~~~~~~~~
    In file included from /freebsd/stable/13/sys/contrib/ngatm/netnatm/sig/sig_reset.c:40:
    /freebsd/stable/13/sys/contrib/ngatm/netnatm/sig/unipriv.h:257:6: note: previous declaration of 'uni_sig_start' with type 'void(struct uni *, enum start_sig,  uint32_t,  struct uni_msg *, struct uni_all *)' {aka 'void(struct uni *, enum start_sig,  unsigned int,  struct uni_msg *, struct uni_all *)'}
      257 | void uni_sig_start(struct uni *, enum start_sig, uint32_t cookie,
          |      ^~~~~~~~~~~~~
    
    Reported by:    GCC -Wenum-int-mismatch
---
 sys/contrib/ngatm/netnatm/api/ccatm.h     | 2 +-
 sys/contrib/ngatm/netnatm/sig/sig_reset.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/sys/contrib/ngatm/netnatm/api/ccatm.h b/sys/contrib/ngatm/netnatm/api/ccatm.h
index 1b4a179a3348..920aa5a065ac 100644
--- a/sys/contrib/ngatm/netnatm/api/ccatm.h
+++ b/sys/contrib/ngatm/netnatm/api/ccatm.h
@@ -134,7 +134,7 @@ struct ccuser *cc_user_create(struct ccdata *, void *, const char *);
 void cc_user_destroy(struct ccuser *);
 
 /* signal from user */
-int cc_user_signal(struct ccuser *, u_int, struct uni_msg *);
+int cc_user_signal(struct ccuser *, enum atmop, struct uni_msg *);
 
 /* Management is given up on this node. */
 void cc_unmanage(struct ccdata *);
diff --git a/sys/contrib/ngatm/netnatm/sig/sig_reset.c b/sys/contrib/ngatm/netnatm/sig/sig_reset.c
index 469b9f762a6e..615d5fa00d08 100644
--- a/sys/contrib/ngatm/netnatm/sig/sig_reset.c
+++ b/sys/contrib/ngatm/netnatm/sig/sig_reset.c
@@ -79,7 +79,7 @@ TIMER_FUNC_UNI(t316, t316_func)
  * Reset-Start process.
  */
 void
-uni_sig_start(struct uni *uni, u_int sig, uint32_t cookie,
+uni_sig_start(struct uni *uni, enum start_sig sig, uint32_t cookie,
     struct uni_msg *m, struct uni_all *u)
 {
 	if (sig >= SIGS_END) {
@@ -435,7 +435,7 @@ start_status(struct uni *uni, struct uni_msg *m, struct uni_all *u)
  * Reset-Respond process.
  */
 void
-uni_sig_respond(struct uni *uni, u_int sig, uint32_t cookie,
+uni_sig_respond(struct uni *uni, enum respond_sig sig, uint32_t cookie,
     struct uni_msg *m, struct uni_all *u)
 {
 	if (sig >= SIGR_END) {