From 3ab113a89dd11b67048634421c793ab0c6291e7b Mon Sep 17 00:00:00 2001 From: bertrik Date: Sat, 9 Jan 2010 17:42:54 +0000 Subject: [PATCH] Make a few global variables static instead of global where possible git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24206 a1c6a512-1295-4272-9138-f99709370657 --- apps/mpeg.c | 12 ++++++------ apps/tree.c | 2 +- firmware/usbstack/usb_hid.c | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/apps/mpeg.c b/apps/mpeg.c index 514379c16..eb2cc735b 100644 --- a/apps/mpeg.c +++ b/apps/mpeg.c @@ -131,10 +131,10 @@ static struct trackdata trackdata[MAX_TRACK_ENTRIES]; static unsigned int current_track_counter = 0; +#ifndef SIMULATOR /* Play time of the previous track */ -unsigned long prev_track_elapsed; +static unsigned long prev_track_elapsed; -#ifndef SIMULATOR static int track_read_idx = 0; static int track_write_idx = 0; #endif /* !SIMULATOR */ @@ -213,10 +213,10 @@ static int prerecord_count; /* Number of seconds in the prerecord buffer */ static int prerecord_timeout; /* The tick count of the next prerecord data store */ -unsigned long record_start_time; /* Value of current_tick when recording - was started */ -unsigned long pause_start_time; /* Value of current_tick when pause was - started */ +static unsigned long record_start_time; /* Value of current_tick when recording + was started */ +static unsigned long pause_start_time; /* Value of current_tick when pause was + started */ static unsigned long last_rec_time; static unsigned long num_rec_bytes; static unsigned long last_rec_bytes; diff --git a/apps/tree.c b/apps/tree.c index 5a8445cac..dda36903e 100644 --- a/apps/tree.c +++ b/apps/tree.c @@ -84,7 +84,7 @@ struct gui_synclist tree_lists; /* I put it here because other files doesn't use it yet, * but should be elsewhere since it will be used mostly everywhere */ #ifdef HAVE_BUTTONBAR -struct gui_buttonbar tree_buttonbar; +static struct gui_buttonbar tree_buttonbar; #endif static struct tree_context tc; diff --git a/firmware/usbstack/usb_hid.c b/firmware/usbstack/usb_hid.c index 6847d0b45..905f2f023 100644 --- a/firmware/usbstack/usb_hid.c +++ b/firmware/usbstack/usb_hid.c @@ -168,14 +168,14 @@ typedef struct bool is_key_released; } usb_hid_report_t; -usb_hid_report_t usb_hid_reports[REPORT_ID_COUNT]; +static usb_hid_report_t usb_hid_reports[REPORT_ID_COUNT]; static unsigned char report_descriptor[HID_BUF_SIZE_REPORT] USB_DEVBSS_ATTR __attribute__((aligned(32))); static unsigned char send_buffer[HID_NUM_BUFFERS][HID_BUF_SIZE_MSG] USB_DEVBSS_ATTR __attribute__((aligned(32))); -size_t send_buffer_len[HID_NUM_BUFFERS]; +static size_t send_buffer_len[HID_NUM_BUFFERS]; static int cur_buf_prepare; static int cur_buf_send; -- 2.11.4.GIT