Index: ram/asgvce.c
===================================================================
--- ram/asgvce.c	(revision 58ff1a975e7d46bcfad22148daccda7d647ad1dd)
+++ ram/asgvce.c	(revision 8d0af8a17981de6858d4d988ef89e88937074696)
@@ -79,5 +79,5 @@
 		DB_CMNT("ne_end - non-step");
 
-		if (E_NULL NE (ep = (struct n_entry *)e_alc(E_SIZE1))) {
+		if ((struct n_entry *)E_NULL NE (ep = (struct n_entry *)e_alc(E_SIZE1))) {
 
 			DB_CMNT("ne_end - enter note end");
@@ -127,5 +127,6 @@
 				grp = nelist->group;	/* get group */
 
-				if (E_NULL NE (ep = (struct n_entry *)e_alc(E_SIZE1))) {
+				if ((struct n_entry *)E_NULL NE
+					(ep = (struct n_entry *)e_alc(E_SIZE1))) {
 
 					DB_CMNT("ne_end - enter note end");
@@ -239,5 +240,6 @@
 		}
 
-		if (E_NULL NE (ep = (struct n_entry *)e_alc(E_SIZE1))) {
+		if ((struct n_entry *)E_NULL NE
+			(ep = (struct n_entry *)e_alc(E_SIZE1))) {
 
 			DB_CMNT("ne_bgn - enter note begin");
Index: ram/delnote.c
===================================================================
--- ram/delnote.c	(revision 58ff1a975e7d46bcfad22148daccda7d647ad1dd)
+++ ram/delnote.c	(revision 8d0af8a17981de6858d4d988ef89e88937074696)
@@ -104,14 +104,14 @@
 								cp = (struct n_entry *)cp->e_bak;
 
-							if (p_ctr EQ ep)
+							if (p_ctr EQ (struct s_entry *)ep)
 								p_ctr = p_ctr->e_bak;
 
-							if (p_bak EQ ep)
+							if (p_bak EQ (struct s_entry *)ep)
 								p_bak = p_bak->e_bak;
 
-							if (p_fwd EQ ep)
+							if (p_fwd EQ (struct s_entry *)ep)
 								p_fwd = p_fwd->e_bak;
 
-							if (p_cur EQ ep)
+							if (p_cur EQ (struct s_entry *)ep)
 								p_cur = p_cur->e_bak;
 
@@ -123,14 +123,14 @@
 								cp = (struct n_entry *)cp->e_bak;
 
-							if (p_ctr EQ bp)
+							if (p_ctr EQ (struct s_entry *)bp)
 								p_ctr = p_ctr->e_bak;
 
-							if (p_bak EQ bp)
+							if (p_bak EQ (struct s_entry *)bp)
 								p_bak = p_bak->e_bak;
 
-							if (p_fwd EQ bp)
+							if (p_fwd EQ (struct s_entry *)bp)
 								p_fwd = p_fwd->e_bak;
 
-							if (p_cur EQ bp)
+							if (p_cur EQ (struct s_entry *)bp)
 								p_cur = p_cur->e_bak;
 
@@ -151,14 +151,14 @@
 								cp = (struct n_entry *)cp->e_bak;
 
-							if (p_ctr EQ bp)
+							if (p_ctr EQ (struct s_entry *)bp)
 								p_ctr = p_ctr->e_bak;
 
-							if (p_bak EQ bp)
+							if (p_bak EQ (struct s_entry *)bp)
 								p_bak = p_bak->e_bak;
 
-							if (p_fwd EQ bp)
+							if (p_fwd EQ (struct s_entry *)bp)
 								p_fwd = p_fwd->e_bak;
 
-							if (p_cur EQ bp)
+							if (p_cur EQ (struct s_entry *)bp)
 								p_cur = p_cur->e_bak;
 
@@ -215,14 +215,14 @@
 			if (EV_BAR EQ ep->e_type) {
 
-				if (ep EQ p_bak)
+				if (ep EQ (struct n_entry *)p_bak)
 					p_bak = p_bak->e_bak;
 
-				if (ep EQ p_ctr)
+				if (ep EQ (struct n_entry *)p_ctr)
 					p_ctr = p_ctr->e_bak;
 
-				if (ep EQ p_cur)
+				if (ep EQ (struct n_entry *)p_cur)
 					p_cur = p_cur->e_bak;
 
-				if (ep EQ p_fwd)
+				if (ep EQ (struct n_entry *)p_fwd)
 					p_fwd = p_fwd->e_bak;
 
Index: ram/localkb.c
===================================================================
--- ram/localkb.c	(revision 58ff1a975e7d46bcfad22148daccda7d647ad1dd)
+++ ram/localkb.c	(revision 8d0af8a17981de6858d4d988ef89e88937074696)
@@ -245,5 +245,5 @@
 						lstends[lstendc] = (struct n_entry *)NULL;
 
-						if ((struct n_entry *)NULL EQ ep)
+						if ((struct s_entry *)NULL EQ ep)
 							continue;
 
@@ -271,5 +271,5 @@
 						lstbgns[lstbgnc] = (struct n_entry *)NULL;
 
-						if ((struct n_entry *)NULL EQ ep)
+						if ((struct s_entry *)NULL EQ ep)
 							continue;
 
Index: ram/nedacc.c
===================================================================
--- ram/nedacc.c	(revision 58ff1a975e7d46bcfad22148daccda7d647ad1dd)
+++ ram/nedacc.c	(revision 8d0af8a17981de6858d4d988ef89e88937074696)
@@ -83,5 +83,5 @@
 	}
 
-	if (E_NULL NE (ep = (struct n_entry *)e_alc(E_SIZE1))) {
+	if ((struct n_entry *)E_NULL NE (ep = (struct n_entry *)e_alc(E_SIZE1))) {
 
 #if	DEBUGIT
@@ -119,5 +119,5 @@
 	DB_ENTR("ned_nat");
 
-	if (E_NULL NE (ep = (struct n_entry *)e_alc(E_SIZE1))) {
+	if ((struct n_entry *)E_NULL NE (ep = (struct n_entry *)e_alc(E_SIZE1))) {
 
 #if	DEBUGIT
@@ -229,5 +229,6 @@
 							DB_CMNT("nedesub - note begin / fini hit");
 
-							if (E_NULL NE (np = (struct n_entry *)e_alc(E_SIZE1))) {
+							if ((struct n_entry *)E_NULL NE
+								(np = (struct n_entry *)e_alc(E_SIZE1))) {
 
 #if	DEBUGIT
@@ -373,14 +374,14 @@
 		DB_CMNT("ned_mvn - clipping out begin");
 
-		if (p_bak EQ bp)
+		if (p_bak EQ (struct s_entry *)bp)
 			p_bak = bp->e_fwd;
 
-		if (p_ctr EQ bp)
+		if (p_ctr EQ (struct s_entry *)bp)
 			p_ctr = bp->e_fwd;
 
-		if (p_cur EQ bp)
+		if (p_cur EQ (struct s_entry *)bp)
 			p_cur = bp->e_fwd;
 
-		if (p_fwd EQ bp)
+		if (p_fwd EQ (struct s_entry *)bp)
 			p_fwd = bp->e_fwd;
 
@@ -391,14 +392,14 @@
 		DB_CMNT("ned_mvn - clipping out end");
 
-		if (p_bak EQ ep)
+		if (p_bak EQ (struct s_entry *)ep)
 			p_bak = ep->e_fwd;
 
-		if (p_ctr EQ ep)
+		if (p_ctr EQ (struct s_entry *)ep)
 			p_ctr = ep->e_fwd;
 
-		if (p_cur EQ ep)
+		if (p_cur EQ (struct s_entry *)ep)
 			p_cur = ep->e_fwd;
 
-		if (p_fwd EQ ep)
+		if (p_fwd EQ (struct s_entry *)ep)
 			p_fwd = ep->e_fwd;
 
@@ -422,5 +423,5 @@
 	} else {
 
-		if (E_NULL NE fcnote(grp, cnote)) {
+		if ((struct n_entry *)E_NULL NE fcnote(grp, cnote)) {
 
 			notesel = TRUE;			/* note selected */
@@ -430,5 +431,6 @@
 		} else if (-1 NE (note = accnote())) {
 
-			if (E_NULL NE (bp = fcnote(grp, note))) {
+			if ((struct n_entry *)E_NULL NE
+				(bp = fcnote(grp, note))) {
 
 				notesel = TRUE;		/* note selected */
@@ -475,14 +477,14 @@
 		DB_CMNT("ned_mvb - clipping out begin");
 
-		if (p_bak EQ bp)
+		if (p_bak EQ (struct s_entry *)bp)
 			p_bak = bp->e_fwd;
 
-		if (p_ctr EQ bp)
+		if (p_ctr EQ (struct s_entry *)bp)
 			p_ctr = bp->e_fwd;
 
-		if (p_cur EQ bp)
+		if (p_cur EQ (struct s_entry *)bp)
 			p_cur = bp->e_fwd;
 
-		if (p_fwd EQ bp)
+		if (p_fwd EQ (struct s_entry *)bp)
 			p_fwd = bp->e_fwd;
 
@@ -502,5 +504,5 @@
 	} else {
 
-		if (E_NULL NE fcnote(grp, cnote)) {	/* natural ? */
+		if ((struct n_entry *)E_NULL NE fcnote(grp, cnote)) {	/* natural ? */
 
 			notesel = TRUE;			/* note selected */
@@ -510,5 +512,6 @@
 		} else if (-1 NE (note = accnote())) {	/* accidental ? */
 
-			if (E_NULL NE (bp = fcnote(grp, note))) {
+			if ((struct n_entry *)E_NULL NE
+				(bp = fcnote(grp, note))) {
 
 				notesel = TRUE;		/* note selected */
@@ -555,14 +558,14 @@
 		DB_CMNT("ned_mve - clipping out end");
 
-		if (p_bak EQ ep)
+		if (p_bak EQ (struct s_entry *)ep)
 			p_bak = ep->e_fwd;
 
-		if (p_ctr EQ ep)
+		if (p_ctr EQ (struct s_entry *)ep)
 			p_ctr = ep->e_fwd;
 
-		if (p_cur EQ ep)
+		if (p_cur EQ (struct s_entry *)ep)
 			p_cur = ep->e_fwd;
 
-		if (p_fwd EQ ep)
+		if (p_fwd EQ (struct s_entry *)ep)
 			p_fwd = ep->e_fwd;
 
@@ -582,5 +585,5 @@
 	} else {
 
-		if (E_NULL NE fcnote(grp, cnote)) {	/* natural ? */
+		if ((struct n_entry *)E_NULL NE fcnote(grp, cnote)) {	/* natural ? */
 
 			notesel = TRUE;			/* note selected */
@@ -590,5 +593,6 @@
 		} else if (-1 NE (note = accnote())) {
 
-			if (E_NULL NE (bp = fcnote(grp, note))) {	/* accidental ? */
+			if ((struct n_entry *)E_NULL NE
+				(bp = fcnote(grp, note))) {	/* accidental ? */
 
 				notesel = TRUE;		/* note selected */
Index: ram/sedump.c
===================================================================
--- ram/sedump.c	(revision 58ff1a975e7d46bcfad22148daccda7d647ad1dd)
+++ ram/sedump.c	(revision 8d0af8a17981de6858d4d988ef89e88937074696)
@@ -403,5 +403,5 @@
 		n = 8;
 
-		while (prptr < olda6) {
+		while (prptr < (int16_t *)olda6) {
 
 			printf("  +%-4d [$%08lX]:  $%04.4X\n",
Index: ram/sqscan.c
===================================================================
--- ram/sqscan.c	(revision 58ff1a975e7d46bcfad22148daccda7d647ad1dd)
+++ ram/sqscan.c	(revision 8d0af8a17981de6858d4d988ef89e88937074696)
@@ -834,5 +834,6 @@
 	if (CM_CHR('+')) {	/* output note begin */
 
-		if (E_NULL EQ (nsp1 = (struct n_entry *)e_alc(E_SIZE1))) {
+		if ((struct n_entry *)E_NULL EQ
+			(nsp1 = (struct n_entry *)e_alc(E_SIZE1))) {
 
 			nospace("note event");
@@ -851,5 +852,6 @@
 	if (CM_CHR('-')) {	/* output note end */
 
-		if (E_NULL EQ (nsp1 = (struct n_entry *)e_alc(E_SIZE1))) {
+		if ((struct n_entry *)E_NULL EQ
+			(nsp1 = (struct n_entry *)e_alc(E_SIZE1))) {
 
 			nospace("note event");
@@ -877,5 +879,6 @@
 		noteoff = t_cur + ((noteper * noteval) / dvwork);
 
-		if (E_NULL EQ (nsp1 = (struct n_entry *)e_alc(E_SIZE1))) {
+		if ((struct n_entry *)E_NULL EQ
+			(nsp1 = (struct n_entry *)e_alc(E_SIZE1))) {
 
 			nospace("note event");
@@ -885,5 +888,6 @@
 		p_cur = (struct s_entry *)insnevt(nsp1, EV_NBEG, curgrp, notenum, 64);
 
-		if (E_NULL EQ (nsp1 = (struct n_entry *)e_alc(E_SIZE1))) {
+		if ((struct n_entry *)E_NULL EQ
+			(nsp1 = (struct n_entry *)e_alc(E_SIZE1))) {
 
 			nospace("note event");
@@ -910,5 +914,6 @@
 	noteoff = t_cur + ((noteval * noteper) / dvwork);
 
-	if (E_NULL EQ (nsp1 = (struct n_entry *)e_alc(E_SIZE1))) {
+	if ((struct n_entry *)E_NULL EQ
+		(nsp1 = (struct n_entry *)e_alc(E_SIZE1))) {
 
 		nospace("note event");
@@ -918,5 +923,6 @@
 	p_cur = (struct s_entry *)insnevt(nsp1, EV_NBEG, curgrp, notenum, 64);
 
-	if (E_NULL EQ (nsp1 = (struct n_entry *)e_alc(E_SIZE1))) {
+	if ((struct n_entry *)E_NULL EQ
+		(nsp1 = (struct n_entry *)e_alc(E_SIZE1))) {
 
 		nospace("note event");
