Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Feb 2023 16:55:57 GMT
From:      Cy Schubert <cy@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 2d263ddfe1be - main - net/tcpview: Permanently fix LLVM15 errors
Message-ID:  <202302151655.31FGtvdi017063@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by cy:

URL: https://cgit.FreeBSD.org/ports/commit/?id=2d263ddfe1bede40316d9a1036b6558bdcb786a2

commit 2d263ddfe1bede40316d9a1036b6558bdcb786a2
Author:     Cy Schubert <cy@FreeBSD.org>
AuthorDate: 2023-02-15 05:20:04 +0000
Commit:     Cy Schubert <cy@FreeBSD.org>
CommitDate: 2023-02-15 16:55:02 +0000

    net/tcpview: Permanently fix LLVM15 errors
    
    Fix int-conversion errors flagged by LLVM15.
    
    detail-domain.c:573:13: error: incompatible pointer to integer conversion
    returning 'void *' from a function with result type 'int' [-Wint-conversion]
                return NULL;
                       ^~~~
    /usr/include/sys/_null.h:34:14: note: expanded from macro 'NULL'
                    ^~~~~~~~~~~
---
 net/tcpview/Makefile                    |   2 -
 net/tcpview/files/patch-detail-domain.c | 135 ++++++++++++++++++++++++++++++--
 2 files changed, 128 insertions(+), 9 deletions(-)

diff --git a/net/tcpview/Makefile b/net/tcpview/Makefile
index bc24506b27ee..dfda6c9ba2b6 100644
--- a/net/tcpview/Makefile
+++ b/net/tcpview/Makefile
@@ -13,8 +13,6 @@ USES=		bison motif tar:Z
 MAKE_ARGS=	PREFIX=${STAGEDIR}${PREFIX}
 MAKE_JOBS_UNSAFE=	yes
 
-CFLAGS=		-Wno-int-conversion
-
 post-patch:
 .for f in nametoaddr.c addrtoname.c print-nfs.c detail-tcp.c tv_addrtoname.c
 	@${REINPLACE_CMD} -e 's/NTOHL/ntohl/ ; s/NTOHS/ntohs/' ${WRKSRC}/${f}
diff --git a/net/tcpview/files/patch-detail-domain.c b/net/tcpview/files/patch-detail-domain.c
index 24cf1399489c..25b1307ca951 100644
--- a/net/tcpview/files/patch-detail-domain.c
+++ b/net/tcpview/files/patch-detail-domain.c
@@ -1,6 +1,14 @@
---- detail-domain.c.orig	1993-04-22 20:39:51 UTC
-+++ detail-domain.c
-@@ -199,6 +199,7 @@ p_type(type)
+--- detail-domain.c.orig	1993-04-22 13:39:51.000000000 -0700
++++ detail-domain.c	2023-02-14 21:16:01.401668000 -0800
+@@ -103,6 +103,7 @@
+ 
+ #define FAIL 1
+ #define SUCCEED 0
++#define IGNORE 0
+ #define MIN(a,b) (((a)<(b))?(a):(b))
+ 
+ 
+@@ -199,6 +200,7 @@
        case T_ANY:		/* matches any type */
  	strcpy(type_buf, "ANY");
  	break;
@@ -8,7 +16,7 @@
        case T_UINFO:
  	strcpy(type_buf, "UINFO");
  	break;
-@@ -211,6 +212,7 @@ p_type(type)
+@@ -211,6 +213,7 @@
        case T_UNSPEC:
  	strcpy(type_buf, "UNSPEC");
          break;
@@ -16,7 +24,120 @@
        default:
  	sprintf(type_buf, "%d", type);
          break;
-@@ -633,6 +635,7 @@ p_ans(msg, eom)
+@@ -444,7 +447,7 @@
+         if (str == NULL) {
+ 	    printf(" ** Data truncated **\n");
+ 	    MARK_WINDOW_NONE();
+-	    return NULL;
++	    return IGNORE;
+ 	}
+         printf("    Canonical name = %s\n", str);
+ 	MARK_WINDOW();
+@@ -455,7 +458,7 @@
+         if (str == NULL) {
+ 	    printf(" ** Data truncated **\n");
+ 	    MARK_WINDOW_NONE();
+-	    return NULL;
++	    return IGNORE;
+ 	}
+         printf("    MB domain name = %s\n", str);
+ 	MARK_WINDOW();
+@@ -466,7 +469,7 @@
+         if (str == NULL) {
+ 	    printf(" ** Data truncated **\n");
+ 	    MARK_WINDOW_NONE();
+-	    return NULL;
++	    return IGNORE;
+ 	}
+         printf("    MD domain name = %s (obsolete)\n", str);
+ 	MARK_WINDOW();
+@@ -477,7 +480,7 @@
+         if (str == NULL) {
+ 	    printf(" ** Data truncated **\n");
+ 	    MARK_WINDOW_NONE();
+-	    return NULL;
++	    return IGNORE;
+ 	}
+         printf("    MF domain name = %s (obsolete)\n", str);
+ 	MARK_WINDOW();
+@@ -488,7 +491,7 @@
+         if (str == NULL) {
+ 	    printf(" ** Data truncated **\n");
+ 	    MARK_WINDOW_NONE();
+-	    return NULL;
++	    return IGNORE;
+ 	}
+         printf("    Mail group member = %s\n", str);
+ 	MARK_WINDOW();
+@@ -499,7 +502,7 @@
+         if (str == NULL) {
+ 	    printf(" ** Data truncated **\n");
+ 	    MARK_WINDOW_NONE();
+-	    return NULL;
++	    return IGNORE;
+ 	}
+         printf("    Mail rename domain name = %s\n", str);
+ 	MARK_WINDOW();
+@@ -512,7 +515,7 @@
+         if (str == NULL) {
+ 	    printf(" ** Data truncated **\n");
+ 	    MARK_WINDOW_NONE();
+-	    return NULL;
++	    return IGNORE;
+ 	}
+         printf("    Mail exchangeer = %s, preference %u\n", str, pref);
+ 	MARK_WINDOW();
+@@ -523,7 +526,7 @@
+         if (str == NULL) {
+ 	    printf(" ** Data truncated **\n");
+ 	    MARK_WINDOW_NONE();
+-	    return NULL;
++	    return IGNORE;
+ 	}
+         printf("    Authoritative name server = %s\n", str);
+ 	MARK_WINDOW();
+@@ -534,7 +537,7 @@
+         if (str == NULL) {
+ 	    printf(" ** Data truncated **\n");
+ 	    MARK_WINDOW_NONE();
+-	    return NULL;
++	    return IGNORE;
+ 	}
+         printf("    Domain name pointer = %s\n", str);
+ 	MARK_WINDOW();
+@@ -568,7 +571,7 @@
+ 	    printf(" ** Data truncated **\n");
+ 	    MARK_WINDOW_NONE();
+ 	    MARK_SAVED_WIN(saveind, -1, -1);
+-	    return NULL;
++	    return IGNORE;
+ 	}
+ 	printf("      Origin: %s\n", str);
+ 	MARK_WINDOW();
+@@ -578,7 +581,7 @@
+ 	    printf(" ** Data truncated **\n");
+ 	    MARK_WINDOW_NONE();
+ 	    MARK_SAVED_WIN(saveind, -1, -1);
+-	    return NULL;
++	    return IGNORE;
+ 	}
+ 	printf("      Mail Addr: %s\n", str);
+ 	MARK_WINDOW();
+@@ -621,18 +624,19 @@
+         if (str == NULL) {
+ 	    printf(" ** Data truncated **\n");
+ 	    MARK_WINDOW_NONE();
+-	    return NULL;
++	    return IGNORE;
+ 	}
+ 	printf("    MINFO: requests = %s", str);
+ 	str = p_cdname(msg, eom);
+         if (str == NULL) {
+ 	    printf(" ** Data truncated **\n");
+ 	    MARK_WINDOW_NONE();
+-	    return NULL;
++	    return IGNORE;
+ 	}
  	printf("; errors = %s\n", str);
  	MARK_WINDOW();
  
@@ -24,7 +145,7 @@
        case T_UINFO:
          printf("    UINFO: ");
          printf("%s\n", cp);
-@@ -654,6 +657,12 @@ p_ans(msg, eom)
+@@ -654,6 +658,12 @@
  	MARK_WINDOW();
          break;
  
@@ -37,7 +158,7 @@
        case T_WKS:
          if (rdlength < (int)(sizeof(u_long) + 1))
              break;
-@@ -730,11 +739,6 @@ p_ans(msg, eom)
+@@ -730,11 +740,6 @@
  	break;
  
  



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202302151655.31FGtvdi017063>