[DRBD-cvs] svn commit by phil - r2400 - trunk/drbd - I want to see the warnings of the compiler, and in case

drbd-cvs at lists.linbit.com drbd-cvs at lists.linbit.com
Mon Sep 11 14:41:55 CEST 2006


Author: phil
Date: 2006-09-11 14:41:50 +0200 (Mon, 11 Sep 2006)
New Revision: 2400

Modified:
   trunk/drbd/drbd_actlog.c
   trunk/drbd/drbd_bitmap.c
   trunk/drbd/drbd_fs.c
   trunk/drbd/drbd_int.h
   trunk/drbd/drbd_main.c
   trunk/drbd/drbd_nl.c
   trunk/drbd/drbd_receiver.c
Log:
I want to see the warnings of the compiler, and in case I work
on the code the errors of the compiler.

In this situation all those explicit warning preprocessor 
statements are really contraproductiove.

sed is you friend in case you want to have the those messages back.

  sed -i -e 's/#warning/\/\/ warning LGE/g' *.[ch]
  


Modified: trunk/drbd/drbd_actlog.c
===================================================================
--- trunk/drbd/drbd_actlog.c	2006-09-11 11:57:21 UTC (rev 2399)
+++ trunk/drbd/drbd_actlog.c	2006-09-11 12:41:50 UTC (rev 2400)
@@ -321,8 +321,8 @@
 
 	buffer->xor_sum = cpu_to_be32(xor_sum);
 
-#warning check outcome of addition u64/sector_t/s32
-#warning "FIXME code missing"
+// warning LGE check outcome of addition u64/sector_t/s32
+// warning LGE "FIXME code missing"
 	sector = mdev->bc->md.md_offset + mdev->bc->md.al_offset + mdev->al_tr_pos;
 
 	if(!drbd_md_sync_page_io(mdev,mdev->bc,sector,WRITE)) {

Modified: trunk/drbd/drbd_bitmap.c
===================================================================
--- trunk/drbd/drbd_bitmap.c	2006-09-11 11:57:21 UTC (rev 2399)
+++ trunk/drbd/drbd_bitmap.c	2006-09-11 12:41:50 UTC (rev 2400)
@@ -55,9 +55,9 @@
  * or wether I want it to do all the sector<->bit calculation in here.
  */
 
-#warning "verify all spin_lock_irq here, and their call path"
-#warning "and change to irqsave where applicable"
-#warning "so we don't accidentally nest spin_lock_irq()"
+// warning LGE "verify all spin_lock_irq here, and their call path"
+// warning LGE "and change to irqsave where applicable"
+// warning LGE "so we don't accidentally nest spin_lock_irq()"
 /*
  * NOTE
  *  Access to the *bm is protected by bm_lock.

Modified: trunk/drbd/drbd_fs.c
===================================================================
--- trunk/drbd/drbd_fs.c	2006-09-11 11:57:21 UTC (rev 2399)
+++ trunk/drbd/drbd_fs.c	2006-09-11 12:41:50 UTC (rev 2400)
@@ -398,7 +398,7 @@
 		goto release_bdev2_fail_ioctl;
 	}
 
-#warning checks below no longer valid
+// warning LGE checks below no longer valid
 // --- rewrite
 #if 0
 	if (drbd_get_capacity(nbc->backing_bdev) >= (sector_t)DRBD_MAX_SECTORS) {

Modified: trunk/drbd/drbd_int.h
===================================================================
--- trunk/drbd/drbd_int.h	2006-09-11 11:57:21 UTC (rev 2399)
+++ trunk/drbd/drbd_int.h	2006-09-11 12:41:50 UTC (rev 2400)
@@ -257,7 +257,7 @@
 	printk(KERN_EMERG DEVICE_NAME "%d: " fmt,			\
 			mdev_to_minor(mdev) , ##args);		\
 } while (0)
-#warning "drbd_panic() does nothing but printk()!"
+// warning LGE "drbd_panic() does nothing but printk()!"
 #endif
 #undef DRBD_PANIC
 
@@ -1551,7 +1551,7 @@
 	ERR_IF_CNT_IS_NEGATIVE(unacked_cnt)
 
 
-#warning "FIXME inherently racy. this is buggy by design :("
+// warning LGE "FIXME inherently racy. this is buggy by design :("
 /**
  * inc_net: Returns TRUE when it is ok to access mdev->net_conf. You
  * should call dec_net() when finished looking at mdev->net_conf.

Modified: trunk/drbd/drbd_main.c
===================================================================
--- trunk/drbd/drbd_main.c	2006-09-11 11:57:21 UTC (rev 2399)
+++ trunk/drbd/drbd_main.c	2006-09-11 12:41:50 UTC (rev 2400)
@@ -297,7 +297,7 @@
 	spin_unlock_irq(&mdev->req_lock);
 }
 
-#warning "FIXME code missing"
+// warning LGE "FIXME code missing"
 #if 0
 /* FIXME "wrong"
  * see comment in receive_Data */
@@ -749,8 +749,8 @@
 
 	if ( ns.role == Primary && ns.conn < Connected &&
 	     ns.disk < Consistent ) {
-#warning "ugly and wrong"
-#warning "FIXME code missing"
+// warning LGE "ugly and wrong"
+// warning LGE "FIXME code missing"
 		drbd_panic("No access to good data anymore.\n");
 	}
 
@@ -1297,7 +1297,7 @@
 			/* write_bm did fail! panic.
 			 * FIXME can we do something better than panic?
 			 */
-#warning "ugly and wrong"
+// warning LGE "ugly and wrong"
 			drbd_panic("Failed to write bitmap to disk\n!");
 			ok = FALSE;
 			goto out;
@@ -2257,7 +2257,7 @@
 	int err;
 
 #if 0
-#warning "DEBUGGING"
+// warning LGE "DEBUGGING"
 /* I am too lazy to calculate this by hand	-lge
  */
 #define SZO(x) printk(KERN_ERR "sizeof(" #x ") = %d\n", sizeof(x))
@@ -2489,7 +2489,7 @@
 			 * but we are supposed to be able to,
 			 * tough!
 			 */
-#warning "ugly and wrong"
+// warning LGE "ugly and wrong"
 			drbd_panic("meta data update failed!\n");
 		}
 	}

Modified: trunk/drbd/drbd_nl.c
===================================================================
--- trunk/drbd/drbd_nl.c	2006-09-11 11:57:21 UTC (rev 2399)
+++ trunk/drbd/drbd_nl.c	2006-09-11 12:41:50 UTC (rev 2400)
@@ -689,7 +689,7 @@
 		goto release_bdev2_fail;
 	}
 
-#warning checks below no longer valid
+// warning LGE checks below no longer valid
 // --- rewrite
 #if 0
 	if (drbd_get_capacity(nbc->backing_bdev) >= (sector_t)DRBD_MAX_SECTORS) {

Modified: trunk/drbd/drbd_receiver.c
===================================================================
--- trunk/drbd/drbd_receiver.c	2006-09-11 11:57:21 UTC (rev 2399)
+++ trunk/drbd/drbd_receiver.c	2006-09-11 12:41:50 UTC (rev 2400)
@@ -1164,7 +1164,7 @@
 		ok = drbd_io_error(mdev);
 	}
 
-#warning "FIXME code missing"
+// warning LGE "FIXME code missing"
 #if 0
 	/* we delete from the conflict detection hash _after_ we sent out the
 	 * WriteAck / NegAck, to get the sequence number right.  */
@@ -1256,7 +1256,7 @@
 
 	/* FIXME drbd_al_begin_io in case we have two primaries... */
 
-#warning "FIXME code missing"
+// warning LGE "FIXME code missing"
 #if 0 
 /* sorry.
  * to get this patch in a shape where it can be committed,
@@ -2368,7 +2368,7 @@
 	 * tcq is currently broken */
 void drbd_set_recv_tcq(drbd_dev * mdev, int tcq_enabled)
 {
-#warning "FIXME make drbd_cmd_handler a member of mdev"
+// warning LGE "FIXME make drbd_cmd_handler a member of mdev"
 	if(tcq_enabled &&
 	   drbd_default_handler[Barrier] != receive_Barrier_tcq) {
 		INFO("Enabling TCQ for barrier processing on backend.\n");
@@ -2880,7 +2880,7 @@
 	_req_mod(req, neg_acked);
 	spin_unlock_irq(&mdev->req_lock);
 
-#warning "ugly and wrong"
+// warning LGE "ugly and wrong"
 	drbd_khelper(mdev,"pri-on-incon-degr");
 	drbd_panic("Got NegDReply. WE ARE LOST. We lost our up-to-date disk.\n");
 
@@ -2903,7 +2903,7 @@
 
 	// In case we are not primary, we could simply live on...
 
-#warning "ugly and wrong"
+// warning LGE "ugly and wrong"
 	drbd_panic("Got NegRSDReply. WE ARE LOST. We lost our up-to-date disk.\n");
 
 	// THINK do we have other options, but panic?



More information about the drbd-cvs mailing list