getdate: fix various warnings which will be errors with clang-16
These were found by Gentoo's QA while rebuilding the world with clang-16: https://bugs.gentoo.org/880519 Signed-off-by: Holger Hoffstätte <holger@applied-asynchrony.com>
This commit is contained in:
parent
6f5df7e4a4
commit
7b97668319
1 changed files with 7 additions and 12 deletions
19
getdate.y
19
getdate.y
|
@ -448,9 +448,9 @@ o_merid : /* NULL */
|
||||||
the same signature as the function definition does. */
|
the same signature as the function definition does. */
|
||||||
#include "getdate.h"
|
#include "getdate.h"
|
||||||
|
|
||||||
extern struct tm *gmtime ();
|
extern struct tm *gmtime (const time_t *timep);
|
||||||
extern struct tm *localtime ();
|
extern struct tm *localtime (const time_t *timep);
|
||||||
extern time_t mktime ();
|
extern time_t mktime (struct tm *tm);
|
||||||
|
|
||||||
/* Month and day table. */
|
/* Month and day table. */
|
||||||
static TABLE const MonthDayTable[] = {
|
static TABLE const MonthDayTable[] = {
|
||||||
|
@ -641,16 +641,13 @@ static TABLE const MilitaryTable[] = {
|
||||||
|
|
||||||
/* ARGSUSED */
|
/* ARGSUSED */
|
||||||
static int
|
static int
|
||||||
yyerror (s)
|
yyerror (char *s ATTRIBUTE_UNUSED)
|
||||||
char *s ATTRIBUTE_UNUSED;
|
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ToHour (Hours, Meridian)
|
ToHour (int Hours, MERIDIAN Meridian)
|
||||||
int Hours;
|
|
||||||
MERIDIAN Meridian;
|
|
||||||
{
|
{
|
||||||
switch (Meridian)
|
switch (Meridian)
|
||||||
{
|
{
|
||||||
|
@ -677,8 +674,7 @@ ToHour (Hours, Meridian)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ToYear (Year)
|
ToYear (int Year)
|
||||||
int Year;
|
|
||||||
{
|
{
|
||||||
if (Year < 0)
|
if (Year < 0)
|
||||||
Year = -Year;
|
Year = -Year;
|
||||||
|
@ -694,8 +690,7 @@ ToYear (Year)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
LookupWord (buff)
|
LookupWord (char *buff)
|
||||||
char *buff;
|
|
||||||
{
|
{
|
||||||
register char *p;
|
register char *p;
|
||||||
register char *q;
|
register char *q;
|
||||||
|
|
Loading…
Reference in a new issue