]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
tools: gen_ethaddr_crc: Make functions static
authorIlias Apalodimas <ilias.apalodimas@linaro.org>
Mon, 7 Jul 2025 11:37:25 +0000 (14:37 +0300)
committerTom Rini <trini@konsulko.com>
Mon, 14 Jul 2025 21:16:40 +0000 (15:16 -0600)
These functions are only used locally. Enabling -Wmissing-prototypes
triggers a warning. Mark them as static.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
tools/gen_ethaddr_crc.c

index e73d0429a04e828b4440a07c326a420467accb59..2771720758097b28fc58ca2e22bb9601fe9c9202 100644 (file)
 #define ARP_HLEN_ASCII (ARP_HLEN * 2) + (ARP_HLEN - 1) /* with separators */
 #define ARP_HLEN_LAZY (ARP_HLEN * 2) /* separatorless hardware address length */
 
-uint8_t nibble_to_hex(const char *nibble, bool lo)
+static uint8_t nibble_to_hex(const char *nibble, bool lo)
 {
        return (strtol(nibble, NULL, 16) << (lo ? 0 : 4)) & (lo ? 0x0f : 0xf0);
 }
 
-int process_mac(const char *mac_address)
+static int process_mac(const char *mac_address)
 {
        uint8_t ethaddr[ARP_HLEN + 1] = { 0x00 };
        uint_fast8_t i = 0;
@@ -45,7 +45,7 @@ int process_mac(const char *mac_address)
        return 0;
 }
 
-void print_usage(char *cmdname)
+static void print_usage(char *cmdname)
 {
        printf("Usage: %s <mac_address>\n", cmdname);
        puts("<mac_address> may be with or without separators.");