From 5719f40db65a72624a0b0f08e546d12bf823bd1e Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Jan 2023 14:38:44 -0800
Subject: [PATCH] Add noreturn attribute to netsnmp_pci_error()

Fixes build with clang16
| mibgroup/if-mib/data_access/interface_linux.c:152:23: error: incompatible function pointer types assigning to 'void (*)(char *, ...) __attribute__((noreturn))' from 'void (char *, ...)' [-Wincompatible-function-pointer-types]
|     pci_access->error = netsnmp_pci_error;
|                       ^ ~~~~~~~~~~~~~~~~~

Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 agent/mibgroup/if-mib/data_access/interface_linux.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/agent/mibgroup/if-mib/data_access/interface_linux.c b/agent/mibgroup/if-mib/data_access/interface_linux.c
index c6cc54e..12eb865 100644
--- a/agent/mibgroup/if-mib/data_access/interface_linux.c
+++ b/agent/mibgroup/if-mib/data_access/interface_linux.c
@@ -31,7 +31,7 @@ static struct pci_access *pci_access;
 /* Avoid letting libpci call exit(1) when no PCI bus is available. */
 static int do_longjmp =0;
 static jmp_buf err_buf;
-static void
+__attribute__((noreturn))  static void
 netsnmp_pci_error(char *msg, ...)
 {
     va_list args;
-- 
2.39.1

