Skip to content

Commit 4dae195

Browse files
committed
m68k: mac: Remove unused yday in unmktime()
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
1 parent f5d1d6d commit 4dae195

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

arch/m68k/mac/misc.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ static void unmktime(time64_t time, long offset,
554554
/* Leap years. */
555555
{ 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 }
556556
};
557-
int days, rem, y, wday, yday;
557+
int days, rem, y, wday;
558558
const unsigned short int *ip;
559559

560560
days = div_u64_rem(time, SECS_PER_DAY, &rem);
@@ -592,7 +592,6 @@ static void unmktime(time64_t time, long offset,
592592
y = yg;
593593
}
594594
*yearp = y - 1900;
595-
yday = days; /* day in the year. Not currently used. */
596595
ip = __mon_yday[__isleap(y)];
597596
for (y = 11; days < (long int) ip[y]; --y)
598597
continue;

0 commit comments

Comments
 (0)