diff mbox

[3/3] Fix sparse static warnings

Message ID 1403733620-8426-3-git-send-email-mike.holmes@linaro.org
State Accepted
Commit b74691142329d9be5bc382d51faf932ad4dcc588
Headers show

Commit Message

Mike Holmes June 25, 2014, 10 p.m. UTC
Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
---
 test/api_test/odp_timer_ping.c | 6 +++---
 test/generator/odp_generator.c | 8 ++++----
 2 files changed, 7 insertions(+), 7 deletions(-)
diff mbox

Patch

diff --git a/test/api_test/odp_timer_ping.c b/test/api_test/odp_timer_ping.c
index 7cfb9fa..ed5ccd4 100644
--- a/test/api_test/odp_timer_ping.c
+++ b/test/api_test/odp_timer_ping.c
@@ -49,10 +49,10 @@  struct packet {
 	char msg[PKTSIZE-sizeof(struct icmphdr)];
 };
 
-int pid = -1;
-struct protoent *proto;
+static int pid = -1;
+static struct protoent *proto;
 
-struct sockaddr_in dst_addr;
+static struct sockaddr_in dst_addr;
 
 /* local struct for ping_timer_thread argument */
 typedef struct {
diff --git a/test/generator/odp_generator.c b/test/generator/odp_generator.c
index 68c119e..8f6ad49 100644
--- a/test/generator/odp_generator.c
+++ b/test/generator/odp_generator.c
@@ -61,7 +61,7 @@  typedef struct {
 /**
  * counters
 */
-struct {
+static struct {
 	odp_atomic_u64_t seq;	/**< ip seq to be send */
 	odp_atomic_u64_t ip;	/**< ip packets */
 	odp_atomic_u64_t udp;	/**< udp packets */
@@ -105,7 +105,7 @@  static void tv_sub(struct timeval *recvtime, struct timeval *sendtime);
  * @param paddr ip address for odp_packet
  * @return 1 success, 0 failed
 */
-int scan_ip(char *buf, unsigned int *paddr)
+static int scan_ip(char *buf, unsigned int *paddr)
 {
 	int part1, part2, part3, part4;
 	char tail = 0;
@@ -146,7 +146,7 @@  int scan_ip(char *buf, unsigned int *paddr)
  * @param  des mac for odp_packet
  * @return 1 success, 0 failed
  */
-int scan_mac(char *in, odp_ethaddr_t *des)
+static int scan_mac(char *in, odp_ethaddr_t *des)
 {
 	int field;
 	int i;
@@ -909,7 +909,7 @@  static void usage(char *progname)
  *@param recvtime start time
  *@param sendtime end time
 */
-void tv_sub(struct timeval *recvtime, struct timeval *sendtime)
+static void tv_sub(struct timeval *recvtime, struct timeval *sendtime)
 {
 	long sec = recvtime->tv_sec - sendtime->tv_sec;
 	long usec = recvtime->tv_usec - sendtime->tv_usec;