* not export that header.
*/
#undef __i386__
-void outb(int a, int b)
+void outb(int a __attribute__ ((__unused__)),
+ int b __attribute__ ((__unused__)))
{
}
-int inb(int c)
+int inb(int c __attribute__ ((__unused__)))
{
return 0;
}
extern unsigned int inb(unsigned long port);
extern void outb(unsigned char b, unsigned long port);
#else
-void outb(int a, int b)
+void outb(int a __attribute__ ((__unused__)),
+ int b __attribute__ ((__unused__)))
{
}
-int inb(int c)
+int inb(int c __attribute__ ((__unused__)))
{
return 0;
}
* TODO: optimize the access to CMOS by mlockall(MCL_CURRENT) and SCHED_FIFO
*/
static unsigned long
-atomic(const char *name, unsigned long (*op) (unsigned long), unsigned long arg)
+atomic(const char *name __attribute__ ((__unused__)),
+ unsigned long (*op) (unsigned long),
+ unsigned long arg)
{
return (*op) (arg);
}
return 0;
}
+#if defined(__i386__) || defined(__alpha__)
+# if defined(HAVE_IOPL)
static int i386_iopl(const int level)
{
-#if defined(__i386__) || defined(__alpha__)
-#if defined(HAVE_IOPL)
extern int iopl(const int lvl);
return iopl(level);
-#else
+}
+# else
+static int i386_iopl(const int level __attribute__ ((__unused__)))
+{
extern int ioperm(unsigned long from, unsigned long num, int turn_on);
return ioperm(clock_ctl_addr, 2, 1);
-#endif
+}
+# endif
#else
+static int i386_iopl(const int level __attribute__ ((__unused__)))
+{
return -2;
-#endif
}
+#endif
static int get_permissions_cmos(void)
{
if (use_dev_port) {
if ((dev_port_fd = open("/dev/port", O_RDWR)) < 0) {
- int errsv = errno;
warn(_("Cannot open /dev/port"));
rc = 1;
} else
* <epoch> == -1 if the user did not specify an "epoch" option.
*/
#ifdef __linux__
+/*
+ * Maintenance note: This should work on non-Alpha machines, but the
+ * evidence today (98.03.04) indicates that the kernel only keeps the epoch
+ * value on Alphas. If that is ever fixed, this function should be changed.
+ */
+# ifndef __alpha__
static void
-manipulate_epoch(const bool getepoch, const bool setepoch,
- const int epoch_opt, const bool testing)
+manipulate_epoch(const bool getepoch __attribute__ ((__unused__)),
+ const bool setepoch __attribute__ ((__unused__)),
+ const int epoch_opt __attribute__ ((__unused__)),
+ const bool testing __attribute__ ((__unused__)))
{
- /*
- * Maintenance note: This should work on non-Alpha machines, but the
- * evidence today (98.03.04) indicates that the kernel only keeps
- * the epoch value on Alphas. If that is ever fixed, this function
- * should be changed.
- */
-#ifndef __alpha__
warnx(_("The kernel keeps an epoch value for the Hardware Clock "
"only on an Alpha machine.\nThis copy of hwclock was built for "
"a machine other than Alpha\n(and thus is presumably not running "
"on an Alpha now). No action taken."));
-#else
+}
+# else
+static void
+manipulate_epoch(const bool getepoch,
+ const bool setepoch,
+ const int epoch_opt,
+ const bool testing)
+{
if (getepoch) {
unsigned long epoch;
printf(_
("Unable to set the epoch value in the kernel.\n"));
}
-#endif
}
-#endif
+# endif /* __alpha__ */
+#endif /* __linux__ */
static void out_version(void)
{
" -w | --systohc set the hardware clock to the current system time\n"
" --systz set the system time based on the current timezone\n"
" --adjust adjust the rtc to account for systematic drift since\n"
- " the clock was last set or adjusted\n"
+ " the clock was last set or adjusted\n"));
#ifdef __linux__
- " --getepoch print out the kernel's hardware clock epoch value\n"
+ fprintf(usageto,
+ _(" --getepoch print out the kernel's hardware clock epoch value\n"
" --setepoch set the kernel's hardware clock epoch value to the \n"
- " value given with --epoch\n"
+ " value given with --epoch\n"));
#endif
- " --predict predict rtc reading at time given with --date\n"
+ fprintf(usageto,
+ _(" --predict predict rtc reading at time given with --date\n"
" -v | --version print out the version of hwclock to stdout\n"
"\nOptions: \n"
" -u | --utc the hardware clock is kept in UTC\n"
- " --localtime the hardware clock is kept in local time\n"
+ " --localtime the hardware clock is kept in local time\n"));
#ifdef __linux__
- " -f | --rtc=path special /dev/... file to use instead of default\n"
+ fprintf(usageto,
+ _(" -f | --rtc=path special /dev/... file to use instead of default\n"));
#endif
- " --directisa access the ISA bus directly instead of %s\n"
+ fprintf(usageto,
+ _(" --directisa access the ISA bus directly instead of %s\n"
" --badyear ignore rtc's year because the bios is broken\n"
" --date specifies the time to which to set the hardware clock\n"
" --epoch=year specifies the year which is the beginning of the \n"
" %s)\n"
" --test do everything except actually updating the hardware\n"
" clock or anything else\n"
- " -D | --debug debug mode\n" "\n"),
- _PATH_RTC_DEV, _PATH_ADJPATH, _PATH_ADJPATH);
+ " -D | --debug debug mode\n" "\n"), _PATH_RTC_DEV,
+ _PATH_ADJPATH, _PATH_ADJPATH);
#ifdef __alpha__
- fprintf(usageto, _(" -J|--jensen, -A|--arc, -S|--srm, -F|--funky-toy\n"
- " tell hwclock the type of alpha you have (see hwclock(8))\n"
- "\n"));
+ fprintf(usageto,
+ _(" -J|--jensen, -A|--arc, -S|--srm, -F|--funky-toy\n"
+ " tell hwclock the type of alpha you have (see hwclock(8))\n"
+ "\n"));
#endif
fflush(usageto);