projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f5d1d6d
)
m68k: mac: Remove unused yday in unmktime()
author
Geert Uytterhoeven
<geert@linux-m68k.org>
Wed, 13 Sep 2023 14:08:20 +0000
(16:08 +0200)
committer
Geert Uytterhoeven
<geert@linux-m68k.org>
Fri, 6 Oct 2023 08:03:03 +0000
(10:03 +0200)
When building with W=1:
arch/m68k/mac/misc.c: In function ‘unmktime’:
arch/m68k/mac/misc.c:557:33: warning: variable ‘yday’ set but not used [-Wunused-but-set-variable]
557 | int days, rem, y, wday, yday;
| ^~~~
Fix this by removing the unused variable and assignment.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link:
https://lore.kernel.org/r/b25c42eac8beb0862f1b2041e817cb421ec66b4e.1694613528.git.geert@linux-m68k.org
arch/m68k/mac/misc.c
patch
|
blob
|
history
diff --git
a/arch/m68k/mac/misc.c
b/arch/m68k/mac/misc.c
index c7cb29f0ff01636073389d849c1029a6347dc613..65107abc8848232cc279881816092cbb3348d2a8 100644
(file)
--- a/
arch/m68k/mac/misc.c
+++ b/
arch/m68k/mac/misc.c
@@
-554,7
+554,7
@@
static void unmktime(time64_t time, long offset,
/* Leap years. */
{ 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 }
};
- int days, rem, y, wday
, yday
;
+ int days, rem, y, wday;
const unsigned short int *ip;
days = div_u64_rem(time, SECS_PER_DAY, &rem);
@@
-592,7
+592,6
@@
static void unmktime(time64_t time, long offset,
y = yg;
}
*yearp = y - 1900;
- yday = days; /* day in the year. Not currently used. */
ip = __mon_yday[__isleap(y)];
for (y = 11; days < (long int) ip[y]; --y)
continue;