Re: patch for some minor warnings in 2.1.85

Andrzej Krzysztofowicz (ankry@green.mif.pg.gda.pl)
Wed, 4 Feb 1998 17:52:17 +0100 (CET)


Trevor Johnson <trevor@jpj.net> wrote:
>
> Here's a patch which fixes these compilation warnings:
>
> sr_vendor.c:148: warning: unused variable `frame'
> sr_vendor.c:148: warning: unused variable `sec'
> sr_vendor.c:148: warning: unused variable `min'
> sched.c:318: warning: `timerlist_lock' defined but not used
> ___
> Trevor Johnson
>
[...]
> --- linux-2.1.85-dist/drivers/scsi/sr_vendor.c Thu Jan 8 20:35:43 1998
> +++ linux/drivers/scsi/sr_vendor.c Wed Feb 4 04:24:29 1998
> @@ -145,7 +145,7 @@
>
> int sr_cd_check(struct cdrom_device_info *cdi)
> {
> - unsigned long sector,min,sec,frame;
> + unsigned long sector;
> unsigned char *buffer; /* the buffer for the ioctl */
> unsigned char cmd[12]; /* the scsi-command */
> int rc,is_xa,no_multi,minor;
>

This part of your patch is buggy (It will not compile with
CONFIG_BLK_DEV_SR_VENDOR set). It should be:

--- linux-2.1.85-dist/drivers/scsi/sr_vendor.c Thu Jan 8 20:35:43 1998
+++ linux/drivers/scsi/sr_vendor.c Fri Jan 30 15:44:10 1998
@@ -145,7 +145,10 @@

int sr_cd_check(struct cdrom_device_info *cdi)
{
- unsigned long sector,min,sec,frame;
+ unsigned long sector;
+#ifdef CONFIG_BLK_DEV_SR_VENDOR
+ unsigned long min,sec,frame;
+#endif /* CONFIG_BLK_DEV_SR_VENDOR */
unsigned char *buffer; /* the buffer for the ioctl */
unsigned char cmd[12]; /* the scsi-command */
int rc,is_xa,no_multi,minor;

-- 
=======================================================================
  Andrzej M. Krzysztofowicz               ankry@mif.pg.gda.pl
  tel.  (0-58) 347 14 61
Wydz.Fizyki Technicznej i Matematyki Stosowanej Politechniki Gdanskiej
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu