From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Sun, 30 Oct 2011 00:39:59 +0200 Subject: [U-Boot] [PATCH] drivers/rtc/ds1337.c: fix GCC 4.6 build warnings In-Reply-To: <1319917151-14369-1-git-send-email-wd@denx.de> References: <1319917151-14369-1-git-send-email-wd@denx.de> Message-ID: <201110300039.59309.marek.vasut@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de > Fix: > ds1337.c: In function 'rtc_get': > ds1337.c:88:52: warning: variable 'control' set but not used > [-Wunused-but-set-variable] > > Signed-off-by: Wolfgang Denk > --- > drivers/rtc/ds1337.c | 16 +++------------- > 1 files changed, 3 insertions(+), 13 deletions(-) > > diff --git a/drivers/rtc/ds1337.c b/drivers/rtc/ds1337.c > index 7abf041..5bb9f94 100644 > --- a/drivers/rtc/ds1337.c > +++ b/drivers/rtc/ds1337.c > @@ -34,16 +34,6 @@ > > #if defined(CONFIG_CMD_DATE) > > -/*---------------------------------------------------------------------*/ > -#undef DEBUG_RTC > - > -#ifdef DEBUG_RTC > -#define DEBUGR(fmt,args...) printf(fmt ,##args) > -#else > -#define DEBUGR(fmt,args...) > -#endif > -/*---------------------------------------------------------------------*/ > - This undermines the ability of fine-grained debuging output, right? Now you can only debug whole uboot or nothing ... correct me if I'm wrong please. > /* > * RTC register addresses > */ > @@ -97,7 +87,7 @@ int rtc_get (struct rtc_time *tmp) > mon_cent = rtc_read (RTC_MON_REG_ADDR); > year = rtc_read (RTC_YR_REG_ADDR); > > - DEBUGR ("Get RTC year: %02x mon/cent: %02x mday: %02x wday: %02x " > + debug("Get RTC year: %02x mon/cent: %02x mday: %02x wday: %02x " > "hr: %02x min: %02x sec: %02x control: %02x status: %02x\n", > year, mon_cent, mday, wday, hour, min, sec, control, status); > Cheers