diff --git a/src/arch/i386/image/eltorito.c b/src/arch/i386/image/eltorito.c index 53e25ca5..9d573106 100644 --- a/src/arch/i386/image/eltorito.c +++ b/src/arch/i386/image/eltorito.c @@ -298,7 +298,7 @@ static int eltorito_load_disk ( struct image *image, * @v image El Torito file * @ret rc Return status code */ -int eltorito_load ( struct image *image ) { +static int eltorito_load ( struct image *image ) { struct eltorito_boot_entry boot_entry; unsigned long bootcat_offset; int rc; diff --git a/src/arch/i386/image/multiboot.c b/src/arch/i386/image/multiboot.c index ab0b55ac..546de365 100644 --- a/src/arch/i386/image/multiboot.c +++ b/src/arch/i386/image/multiboot.c @@ -360,7 +360,7 @@ static int multiboot_load_elf ( struct image *image ) { * @v image Multiboot file * @ret rc Return status code */ -int multiboot_load ( struct image *image ) { +static int multiboot_load ( struct image *image ) { struct multiboot_header_info hdr; int rc; diff --git a/src/arch/i386/image/nbi.c b/src/arch/i386/image/nbi.c index 3a66e9cb..42596f05 100644 --- a/src/arch/i386/image/nbi.c +++ b/src/arch/i386/image/nbi.c @@ -244,7 +244,7 @@ static int nbi_process_segments ( struct image *image, * @v image NBI image * @ret rc Return status code */ -int nbi_load ( struct image *image ) { +static int nbi_load ( struct image *image ) { struct imgheader imgheader; int rc; diff --git a/src/crypto/axtls/aes.c b/src/crypto/axtls/aes.c index 9154a515..298e4193 100644 --- a/src/crypto/axtls/aes.c +++ b/src/crypto/axtls/aes.c @@ -238,6 +238,9 @@ void AES_set_key(AES_CTX *ctx, const uint8_t *key, memcpy(ctx->iv, iv, 16); } +#if 0 +/** currently unused function **/ + /** * Change a key for decryption. */ @@ -256,6 +259,7 @@ void AES_convert_key(AES_CTX *ctx) *k++ =w; } } +#endif /** * Encrypt a byte sequence (with a block size 16) using the AES cipher. diff --git a/src/crypto/axtls/crypto.h b/src/crypto/axtls/crypto.h index f6277adc..855282fa 100644 --- a/src/crypto/axtls/crypto.h +++ b/src/crypto/axtls/crypto.h @@ -54,7 +54,9 @@ void AES_set_key(AES_CTX *ctx, const uint8_t *key, void AES_cbc_encrypt(AES_CTX *ctx, const uint8_t *msg, uint8_t *out, int length); void AES_cbc_decrypt(AES_CTX *ks, const uint8_t *in, uint8_t *out, int length); +#if 0 /** currently unused function **/ void AES_convert_key(AES_CTX *ctx); +#endif /************************************************************************** * RC4 declarations diff --git a/src/crypto/md5.c b/src/crypto/md5.c index 09378e20..1fed24fc 100644 --- a/src/crypto/md5.c +++ b/src/crypto/md5.c @@ -54,7 +54,7 @@ static u32 __md5step f4(u32 b, u32 c, u32 d) return ( c ^ ( b | ~d ) ); } -struct md5_step md5_steps[4] = { +static struct md5_step md5_steps[4] = { { .f = f1, .coefficient = 1, diff --git a/src/drivers/net/bnx2.c b/src/drivers/net/bnx2.c index 105e9c3f..fdd6655b 100644 --- a/src/drivers/net/bnx2.c +++ b/src/drivers/net/bnx2.c @@ -43,7 +43,7 @@ static struct bss { struct statistics_block stats_blk; } bnx2_bss; -struct bnx2 bnx2; +static struct bnx2 bnx2; static struct flash_spec flash_table[] = { diff --git a/src/drivers/net/ns83820.c b/src/drivers/net/ns83820.c index 8b8500f4..3262ba6c 100755 --- a/src/drivers/net/ns83820.c +++ b/src/drivers/net/ns83820.c @@ -364,7 +364,7 @@ struct ring_desc { #endif /* Private Storage for the NIC */ -struct ns83820_private { +static struct ns83820_private { u8 *base; int up; long idle; diff --git a/src/drivers/net/pcnet32.c b/src/drivers/net/pcnet32.c index 0328cf2c..63353e3f 100644 --- a/src/drivers/net/pcnet32.c +++ b/src/drivers/net/pcnet32.c @@ -67,7 +67,7 @@ static struct nic_operations pcnet32_operations; /* End Etherboot Specific */ -int cards_found /* __initdata */ ; +static int cards_found = 0 /* __initdata */ ; #ifdef REMOVE /* FIXME: Remove these they are probably pointless */ diff --git a/src/drivers/net/r8169.c b/src/drivers/net/r8169.c index d9854e9c..08d1c6f6 100644 --- a/src/drivers/net/r8169.c +++ b/src/drivers/net/r8169.c @@ -400,7 +400,7 @@ static void rtl8169_hw_PHY_config(struct nic *nic __unused); // 20-16 5-bit GMII/MII register address // 15-0 16-bit GMII/MII register data //================================================================= -void RTL8169_WRITE_GMII_REG(unsigned long ioaddr, int RegAddr, int value) +static void RTL8169_WRITE_GMII_REG(unsigned long ioaddr, int RegAddr, int value) { int i; @@ -418,7 +418,7 @@ void RTL8169_WRITE_GMII_REG(unsigned long ioaddr, int RegAddr, int value) } //================================================================= -int RTL8169_READ_GMII_REG(unsigned long ioaddr, int RegAddr) +static int RTL8169_READ_GMII_REG(unsigned long ioaddr, int RegAddr) { int i, value = -1; diff --git a/src/drivers/net/via-velocity.h b/src/drivers/net/via-velocity.h index e0b8809f..c296d289 100644 --- a/src/drivers/net/via-velocity.h +++ b/src/drivers/net/via-velocity.h @@ -1204,7 +1204,7 @@ struct velocity_info_tbl { u32 flags; }; -struct velocity_info_tbl *info; +static struct velocity_info_tbl *info; #define mac_hw_mibs_init(regs) {\ BYTE_REG_BITS_ON(MIBCR_MIBFRZ,&((regs)->MIBCR));\ @@ -1768,7 +1768,7 @@ struct velocity_opt { #define TX_DESC_MAX 256 #define TX_DESC_DEF TX_DESC_MIN -struct velocity_info { +static struct velocity_info { // struct list_head list; struct pci_device *pdev; diff --git a/src/hci/commands/image_cmd.c b/src/hci/commands/image_cmd.c index 2d35ebcb..97d41bdf 100644 --- a/src/hci/commands/image_cmd.c +++ b/src/hci/commands/image_cmd.c @@ -45,7 +45,8 @@ * @v nargs Argument count * @v args Argument list */ -void imgfill_cmdline ( struct image *image, unsigned int nargs, char **args ) { +static void imgfill_cmdline ( struct image *image, unsigned int nargs, + char **args ) { size_t used = 0; image->cmdline[0] = '\0'; diff --git a/src/hci/mucurses/kb.c b/src/hci/mucurses/kb.c index f0c8dcb0..291ee6ac 100644 --- a/src/hci/mucurses/kb.c +++ b/src/hci/mucurses/kb.c @@ -19,18 +19,7 @@ int m_delay; /* bool m_echo; bool m_cbreak; -/** - * Check KEY_ code supported status - * - * @v kc keycode value to check - * @ret TRUE KEY_* supported - * @ret FALSE KEY_* unsupported - */ -int has_key ( int kc __unused ) { - return TRUE; -} - -int _wgetc ( WINDOW *win ) { +static int _wgetc ( WINDOW *win ) { int timer, c; if ( win == NULL ) diff --git a/src/hci/mucurses/slk.c b/src/hci/mucurses/slk.c index 4422e15a..600658e7 100644 --- a/src/hci/mucurses/slk.c +++ b/src/hci/mucurses/slk.c @@ -50,7 +50,7 @@ struct _softlabelkeys { short saved_pair; }; -struct _softlabelkeys *slks; +static struct _softlabelkeys *slks; /* I either need to break the primitives here, or write a collection of diff --git a/src/include/curses.h b/src/include/curses.h index 164dd202..762a63b5 100644 --- a/src/include/curses.h +++ b/src/include/curses.h @@ -566,6 +566,10 @@ static inline bool has_colors ( void ) { return TRUE; } +static inline int has_key ( int kc __unused ) { + return TRUE; +} + static inline int hline ( chtype ch, int n ) { return whline ( stdscr, ch, n ); } diff --git a/src/net/ndp.c b/src/net/ndp.c index 7c684e7c..3b6984db 100644 --- a/src/net/ndp.c +++ b/src/net/ndp.c @@ -65,8 +65,9 @@ ndp_find_entry ( struct in6_addr *in6 ) { * @v ll_addr Link-layer address * @v state State of the entry - one of the NDP_STATE_XXX values */ -void add_ndp_entry ( struct net_device *netdev, struct in6_addr *in6, - void *ll_addr, int state ) { +static void +add_ndp_entry ( struct net_device *netdev, struct in6_addr *in6, + void *ll_addr, int state ) { struct ndp_entry *ndp; ndp = &ndp_table[next_new_ndp_entry++ % NUM_NDP_ENTRIES]; diff --git a/src/net/tcp/http.c b/src/net/tcp/http.c index 88958af5..9c243681 100644 --- a/src/net/tcp/http.c +++ b/src/net/tcp/http.c @@ -465,7 +465,7 @@ static struct xfer_interface_operations http_xfer_operations = { * @v uri Uniform Resource Identifier * @ret rc Return status code */ -int http_open ( struct xfer_interface *xfer, struct uri *uri ) { +static int http_open ( struct xfer_interface *xfer, struct uri *uri ) { struct http_request *http; struct sockaddr_tcpip server; int rc; diff --git a/src/usr/autoboot.c b/src/usr/autoboot.c index 97b9a406..4bc43d5a 100644 --- a/src/usr/autoboot.c +++ b/src/usr/autoboot.c @@ -103,7 +103,7 @@ static int boot_root_path ( const char *root_path ) { * @v netdev Network device * @ret rc Return status code */ -int netboot ( struct net_device *netdev ) { +static int netboot ( struct net_device *netdev ) { char buf[256]; int rc;