[Mit-cadr-cvs] r370 - in trunk/emulator/usim: . CADR

ggilley at common-lisp.net ggilley at common-lisp.net
Wed Nov 28 17:03:10 UTC 2012


Author: ggilley
Date: Wed Nov 28 09:03:09 2012
New Revision: 370

Log:
clean up some warnings

Modified:
   trunk/emulator/usim/CADR/BreakpointsController.m
   trunk/emulator/usim/CADR/CreateDiskController.m
   trunk/emulator/usim/CADR/DebugSettingsController.m
   trunk/emulator/usim/CADR/DebuggerController.m
   trunk/emulator/usim/CADR/PreferenceController.m
   trunk/emulator/usim/CADR/SimView.m
   trunk/emulator/usim/CADR/cadrAppDelegate.m
   trunk/emulator/usim/Files.c
   trunk/emulator/usim/chaos.c
   trunk/emulator/usim/chaos.h
   trunk/emulator/usim/decode.c
   trunk/emulator/usim/ether.c
   trunk/emulator/usim/syms.c
   trunk/emulator/usim/ucode.c

Modified: trunk/emulator/usim/CADR/BreakpointsController.m
==============================================================================
--- trunk/emulator/usim/CADR/BreakpointsController.m	Tue Nov 27 23:21:11 2012	(r369)
+++ trunk/emulator/usim/CADR/BreakpointsController.m	Wed Nov 28 09:03:09 2012	(r370)
@@ -59,7 +59,7 @@
 {
     NSInteger row = [_tableView selectedRow];
 
-    removebreakpoint(row);
+    removebreakpoint((int)row);
     [_tableView reloadData];
 }
 

Modified: trunk/emulator/usim/CADR/CreateDiskController.m
==============================================================================
--- trunk/emulator/usim/CADR/CreateDiskController.m	Tue Nov 27 23:21:11 2012	(r369)
+++ trunk/emulator/usim/CADR/CreateDiskController.m	Wed Nov 28 09:03:09 2012	(r370)
@@ -236,7 +236,7 @@
     if (col == -1 || row == -1)
         return;
 
-    printf("clicked row=%d col=%d\n", row, col);
+    printf("clicked row=%ld col=%ld\n", row, col);
 
     if (col == 5)
     {

Modified: trunk/emulator/usim/CADR/DebugSettingsController.m
==============================================================================
--- trunk/emulator/usim/CADR/DebugSettingsController.m	Tue Nov 27 23:21:11 2012	(r369)
+++ trunk/emulator/usim/CADR/DebugSettingsController.m	Wed Nov 28 09:03:09 2012	(r370)
@@ -66,7 +66,7 @@
 - (IBAction)changeTrace:(id)sender {
     extern int trace;
     
-    trace = [traceCheckbox state];
+    trace = (int)[traceCheckbox state];
     [[NSUserDefaults standardUserDefaults] setInteger:trace forKey:@"Trace"];
     [[NSUserDefaults standardUserDefaults] synchronize];
 }
@@ -74,7 +74,7 @@
 - (IBAction)changeTraceMCRLabels:(id)sender {
     extern int trace_mcr_labels_flag;
     
-    trace_mcr_labels_flag = [traceMCRLabels state];
+    trace_mcr_labels_flag = (int)[traceMCRLabels state];
     [[NSUserDefaults standardUserDefaults] setInteger:trace_mcr_labels_flag forKey:@"TraceMCR"];
     [[NSUserDefaults standardUserDefaults] synchronize];
 }
@@ -82,7 +82,7 @@
 - (IBAction)changeTraceLOD:(id)sender {
     extern int trace_lod_labels_flag;
     
-    trace_lod_labels_flag = [traceLODLabels state];
+    trace_lod_labels_flag = (int)[traceLODLabels state];
     [[NSUserDefaults standardUserDefaults] setInteger:trace_lod_labels_flag forKey:@"TraceLODLabels"];
     [[NSUserDefaults standardUserDefaults] synchronize];
 }
@@ -90,7 +90,7 @@
 - (IBAction)changeTracePROM:(id)sender {
     extern int trace_prom_flag;
     
-    trace_prom_flag = [tracePROM state];
+    trace_prom_flag = (int)[tracePROM state];
     [[NSUserDefaults standardUserDefaults] setInteger:trace_prom_flag forKey:@"TracePROM"];
     [[NSUserDefaults standardUserDefaults] synchronize];
 }
@@ -98,7 +98,7 @@
 - (IBAction)changeTraceMCR:(id)sender {
     extern int trace_mcr_flag;
     
-    trace_mcr_flag = [traceMCR state];
+    trace_mcr_flag = (int)[traceMCR state];
     [[NSUserDefaults standardUserDefaults] setInteger:trace_mcr_flag forKey:@"TraceMCR"];
     [[NSUserDefaults standardUserDefaults] synchronize];
 }
@@ -106,7 +106,7 @@
 - (IBAction)changeTraceIO:(id)sender {
     extern int trace_io_flag;
     
-    trace_io_flag = [traceIO state];
+    trace_io_flag = (int)[traceIO state];
     [[NSUserDefaults standardUserDefaults] setInteger:trace_io_flag forKey:@"TraceIO"];
     [[NSUserDefaults standardUserDefaults] synchronize];
 }
@@ -114,7 +114,7 @@
 - (IBAction)changeTraceVM:(id)sender {
     extern int trace_vm_flag;
     
-    trace_vm_flag = [traceVM state];
+    trace_vm_flag = (int)[traceVM state];
     [[NSUserDefaults standardUserDefaults] setInteger:trace_vm_flag forKey:@"TraceVM"];
     [[NSUserDefaults standardUserDefaults] synchronize];
 }
@@ -122,7 +122,7 @@
 - (IBAction)changeTraceDisk:(id)sender {
     extern int trace_disk_flag;
     
-    trace_disk_flag = [traceDisk state];
+    trace_disk_flag = (int)[traceDisk state];
     [[NSUserDefaults standardUserDefaults] setInteger:trace_disk_flag forKey:@"TraceDisk"];
     [[NSUserDefaults standardUserDefaults] synchronize];
 }
@@ -130,7 +130,7 @@
 - (IBAction)changeTraceNet:(id)sender {
     extern int trace_net_flag;
     
-    trace_net_flag = [traceNet state];
+    trace_net_flag = (int)[traceNet state];
     [[NSUserDefaults standardUserDefaults] setInteger:trace_net_flag forKey:@"TraceNet"];
     [[NSUserDefaults standardUserDefaults] synchronize];
 }
@@ -138,7 +138,7 @@
 - (IBAction)changeTraceInt:(id)sender {
     extern int trace_int_flag;
     
-    trace_int_flag = [traceInt state];
+    trace_int_flag = (int)[traceInt state];
     [[NSUserDefaults standardUserDefaults] setInteger:trace_int_flag forKey:@"TraceInt"];
     [[NSUserDefaults standardUserDefaults] synchronize];
 }
@@ -146,7 +146,7 @@
 - (IBAction)changeTraceLateSet:(id)sender {
     extern int trace_late_set;
     
-    trace_late_set = [traceLateSet state];
+    trace_late_set = (int)[traceLateSet state];
     [[NSUserDefaults standardUserDefaults] setInteger:trace_late_set forKey:@"TraceLateSet"];
     [[NSUserDefaults standardUserDefaults] synchronize];
 }
@@ -154,7 +154,7 @@
 - (IBAction)changeTraceAfter:(id)sender {
     extern int trace_after_flag;
     
-    trace_after_flag = [traceAfter state];
+    trace_after_flag = (int)[traceAfter state];
     [[NSUserDefaults standardUserDefaults] setInteger:trace_after_flag forKey:@"TraceAfter"];
     [[NSUserDefaults standardUserDefaults] synchronize];
 }

Modified: trunk/emulator/usim/CADR/DebuggerController.m
==============================================================================
--- trunk/emulator/usim/CADR/DebuggerController.m	Tue Nov 27 23:21:11 2012	(r369)
+++ trunk/emulator/usim/CADR/DebuggerController.m	Wed Nov 28 09:03:09 2012	(r370)
@@ -104,6 +104,7 @@
         if (macromicro)
         {
             char *disass(unsigned int fefptr, unsigned int loc, int even, unsigned int inst);
+            int read_mem_debug(int vaddr, unsigned int *pv);
             char *name = find_function_name(pc);
             unsigned int instr;
             char *decoded;

Modified: trunk/emulator/usim/CADR/PreferenceController.m
==============================================================================
--- trunk/emulator/usim/CADR/PreferenceController.m	Tue Nov 27 23:21:11 2012	(r369)
+++ trunk/emulator/usim/CADR/PreferenceController.m	Wed Nov 28 09:03:09 2012	(r370)
@@ -41,6 +41,6 @@
 {
     NSInteger state = [checkbox state];
 
-    NSLog(@"checkbox changed %d", state);
+    NSLog(@"checkbox changed %ld", state);
 }
 @end

Modified: trunk/emulator/usim/CADR/SimView.m
==============================================================================
--- trunk/emulator/usim/CADR/SimView.m	Tue Nov 27 23:21:11 2012	(r369)
+++ trunk/emulator/usim/CADR/SimView.m	Wed Nov 28 09:03:09 2012	(r370)
@@ -21,6 +21,8 @@
 
 extern CGImageRef cgImage;
 extern NSWindow *mWindow;
+extern void iob_sdl_mouse_event(int x, int y, int dx, int dy, int buttons);
+
 
 NSView *myView;
 
@@ -86,6 +88,7 @@
 }
 
 - (void)keyDown:(NSEvent *)theEvent {
+    void iob_sdl_key_event(int code, int extra);
 	int extra;
     NSUInteger modifiers = [theEvent modifierFlags];
     
@@ -154,7 +157,7 @@
     NSInteger buttons = [theEvent buttonNumber];
     extern unsigned int video_height;
     
-    iob_sdl_mouse_event((int)eyeCenter.x, (int)video_height - (int)eyeCenter.y - 1, 0, 0, buttons);
+    iob_sdl_mouse_event((int)eyeCenter.x, (int)video_height - (int)eyeCenter.y - 1, 0, 0, (int)buttons);
 }
 
 - (void)mouseEntered:(NSEvent *)anEvent
@@ -212,6 +215,8 @@
 
 - (void)run:(id)path
 {
+    int run(void);
+
     diskImagePath = [path retain];
     NSLog(@"running disk.img: %@", diskImagePath);
     run();
@@ -228,6 +233,8 @@
 }
 
 - (IBAction)dumpState:(id)sender {
+    void dump_state(void);
+
     dump_state();
 }
 

Modified: trunk/emulator/usim/CADR/cadrAppDelegate.m
==============================================================================
--- trunk/emulator/usim/CADR/cadrAppDelegate.m	Tue Nov 27 23:21:11 2012	(r369)
+++ trunk/emulator/usim/CADR/cadrAppDelegate.m	Wed Nov 28 09:03:09 2012	(r370)
@@ -376,6 +376,11 @@
 
 - (void)applicationDidFinishLaunching:(NSNotification *)aNotification
 {
+    int disk_init(char *filename);
+    int iob_init(void);
+    int ether_init(void);
+    void iob_warm_boot_key(void);
+    
     // Insert code here to initialize your application
     Black = 0x00000000;
     White = 0xFFFFFFFF;
@@ -394,7 +399,7 @@
     }
     [fmngr release];
 
-    disk_init([diskImagePath cStringUsingEncoding:NSASCIIStringEncoding]);
+    disk_init((char *)[diskImagePath cStringUsingEncoding:NSASCIIStringEncoding]);
     
     read_labl([diskImagePath cStringUsingEncoding:NSASCIIStringEncoding]);
 
@@ -421,18 +426,18 @@
         extern int trace_late_set;
         extern int trace_after_flag;
 
-        trace = [defaults integerForKey:@"Trace"];
-        trace_mcr_labels_flag = [defaults integerForKey:@"TraceMCRLabels"];
-        trace_lod_labels_flag = [defaults integerForKey:@"TraceLODLabels"];
-        trace_prom_flag = [defaults integerForKey:@"TracePROM"];
-        trace_mcr_flag = [defaults integerForKey:@"TraceMCR"];
-        trace_io_flag = [defaults integerForKey:@"TraceIO"];
-        trace_vm_flag = [defaults integerForKey:@"TraceVM"];
-        trace_disk_flag = [defaults integerForKey:@"TraceDisk"];
-        trace_net_flag = [defaults integerForKey:@"TraceNet"];
-        trace_int_flag = [defaults integerForKey:@"TraceInt"];
-        trace_late_set = [defaults integerForKey:@"TraceLateSet"];
-        trace_after_flag = [defaults integerForKey:@"TraceAfter"];
+        trace = (int)[defaults integerForKey:@"Trace"];
+        trace_mcr_labels_flag = (int)[defaults integerForKey:@"TraceMCRLabels"];
+        trace_lod_labels_flag = (int)[defaults integerForKey:@"TraceLODLabels"];
+        trace_prom_flag = (int)[defaults integerForKey:@"TracePROM"];
+        trace_mcr_flag = (int)[defaults integerForKey:@"TraceMCR"];
+        trace_io_flag = (int)[defaults integerForKey:@"TraceIO"];
+        trace_vm_flag = (int)[defaults integerForKey:@"TraceVM"];
+        trace_disk_flag = (int)[defaults integerForKey:@"TraceDisk"];
+        trace_net_flag = (int)[defaults integerForKey:@"TraceNet"];
+        trace_int_flag = (int)[defaults integerForKey:@"TraceInt"];
+        trace_late_set = (int)[defaults integerForKey:@"TraceLateSet"];
+        trace_after_flag = (int)[defaults integerForKey:@"TraceAfter"];
 
         NSData *bookmarkData = [defaults objectForKey:@"SourceFolder"];
         if (bookmarkData)

Modified: trunk/emulator/usim/Files.c
==============================================================================
--- trunk/emulator/usim/Files.c	Tue Nov 27 23:21:11 2012	(r369)
+++ trunk/emulator/usim/Files.c	Wed Nov 28 09:03:09 2012	(r370)
@@ -4930,9 +4930,10 @@
  * Character set conversion routines.
  */
 static void
-buffer_to_lispm(unsigned char *data, int length)
+buffer_to_lispm(unsigned char *data, ssize_t length)
 {
-    register int c, i;
+    register int c;
+    register ssize_t i;
     
     for (i = 0; i < length; i++) {
         c = data[i] & 0377;
@@ -4976,7 +4977,8 @@
         int binary = 0;
         chaos_packet *packet;
         chaos_packet *output;
-        int length, fd;
+        ssize_t length;
+        int fd;
         char tbuf[20];
         struct stat sbuf;
         struct tm *ptm;

Modified: trunk/emulator/usim/chaos.c
==============================================================================
--- trunk/emulator/usim/chaos.c	Tue Nov 27 23:21:11 2012	(r369)
+++ trunk/emulator/usim/chaos.c	Wed Nov 28 09:03:09 2012	(r370)
@@ -832,7 +832,7 @@
 }
 
 chaos_packet *
-chaos_allocate_packet(chaos_connection *conn, int opcode, int len)
+chaos_allocate_packet(chaos_connection *conn, int opcode, ssize_t len)
 {
     chaos_packet *packet = (chaos_packet *)malloc(CHAOS_PACKET_HEADER_SIZE + (size_t)len);
     

Modified: trunk/emulator/usim/chaos.h
==============================================================================
--- trunk/emulator/usim/chaos.h	Tue Nov 27 23:21:11 2012	(r369)
+++ trunk/emulator/usim/chaos.h	Wed Nov 28 09:03:09 2012	(r370)
@@ -133,7 +133,7 @@
 void chaos_connection_queue(chaos_connection *conn, chaos_packet *packet);
 chaos_packet *chaos_connection_dequeue(chaos_connection *conn);
 chaos_connection *chaos_open_connection(int co_host, char *contact, int mode, int async, int rwsize);
-chaos_packet *chaos_allocate_packet(chaos_connection *conn, int opcode, int len);
+chaos_packet *chaos_allocate_packet(chaos_connection *conn, int opcode, ssize_t len);
 void chaos_dump_connection(chaos_connection *conn);
 
 

Modified: trunk/emulator/usim/decode.c
==============================================================================
--- trunk/emulator/usim/decode.c	Tue Nov 27 23:21:11 2012	(r369)
+++ trunk/emulator/usim/decode.c	Wed Nov 28 09:03:09 2012	(r370)
@@ -1152,6 +1152,7 @@
 static int misc_inst_vector_setup;
 
 char *disass(unsigned int fefptr, unsigned int loc, int even, unsigned int inst);
+extern int read_mem(int vaddr, unsigned int *pv);
 
 static char *
 disassemble_address(unsigned int fef, unsigned int reg, unsigned int delta)

Modified: trunk/emulator/usim/ether.c
==============================================================================
--- trunk/emulator/usim/ether.c	Tue Nov 27 23:21:11 2012	(r369)
+++ trunk/emulator/usim/ether.c	Wed Nov 28 09:03:09 2012	(r370)
@@ -109,7 +109,7 @@
 int
 ether_init(void)
 {
-#ifdef BSD
+#if defined(BSD) && !defined(OSX)
 	int one = 1;
 	struct ifreq ifr;
 	int s;
@@ -169,10 +169,12 @@
 {
 	int i, j, words;
 	uint16_t status;
-	uint32_t ptr, crc;
+	uint32_t ptr;
 	size_t len;
+#if defined(BSD) && !defined(OSX)
 	ssize_t ret;
-
+#endif
+    
 	if (enabled) {
 
 	    if (moder & ETHER_MODE_TXEN) {

Modified: trunk/emulator/usim/syms.c
==============================================================================
--- trunk/emulator/usim/syms.c	Tue Nov 27 23:21:11 2012	(r369)
+++ trunk/emulator/usim/syms.c	Wed Nov 28 09:03:09 2012	(r370)
@@ -196,7 +196,7 @@
 	int i;
 
 	/* make vector of ptrs to syms */
-	tab->sorted_syms = (struct sym_s **)malloc(sizeof(void *) * tab->sym_count);
+	tab->sorted_syms = (struct sym_s **)malloc(sizeof(struct sym_s *) * tab->sym_count);
 	if (tab->sorted_syms == 0)
 		return -1;
 

Modified: trunk/emulator/usim/ucode.c
==============================================================================
--- trunk/emulator/usim/ucode.c	Tue Nov 27 23:21:11 2012	(r369)
+++ trunk/emulator/usim/ucode.c	Wed Nov 28 09:03:09 2012	(r370)
@@ -1387,7 +1387,7 @@
 {
   struct pc_histogram_s *e1 = (struct pc_histogram_s *)n1;
   struct pc_histogram_s *e2 = (struct pc_histogram_s *)n2;
-  return e2->count - e1->count;
+  return (int)(e2->count - e1->count);
 }
 
 void
@@ -1657,7 +1657,8 @@
 int
 restore_state(void)
 {
-	int fd, ret, i;
+	int fd, i;
+    ssize_t ret;
 	unsigned char version[2];
 
 	if (restored)
@@ -1692,7 +1693,8 @@
 int
 save_state(void)
 {
-	int fd, ret, i;
+	int fd, i;
+    ssize_t ret;
 	unsigned char version[2];
 
 	fd = open("usim.state", O_RDWR | O_CREAT, 0666);
@@ -2433,31 +2435,31 @@
 				case 1: /* (M&A)-1 */
 					lv = (long long)(m_src_value & a_src_value) -
 						(carry_in ? 0 : 1);
-					alu_out = lv;
+					alu_out = (unsigned int)lv;
 					alu_carry = (lv >> 32) ? 1 : 0;
 					break;
 				case 2: /* (M&~A)-1 */
 					lv = (long long)(m_src_value & ~a_src_value) -
 						(carry_in ? 0 : 1);
-					alu_out = lv;
+					alu_out = (unsigned int)lv;
 					alu_carry = (lv >> 32) ? 1 : 0;
 					break;
 				case 3: /* M-1 */
 					lv = (long long)m_src_value - (carry_in ? 0 : 1);
-					alu_out = lv;
+					alu_out = (unsigned int)lv;
 					alu_carry = (lv >> 32) ? 1 : 0;
 					break;
 				case 4: /* M|~A */
 					lv = (long long)(m_src_value | ~a_src_value) +
 						(carry_in ? 1 : 0);
-					alu_out = lv;
+					alu_out = (unsigned int)lv;
 					alu_carry = (lv >> 32) ? 1 : 0;
 					break;
 				case 5: /* (M|~A)+(M&A) */
 					lv = (long long)(m_src_value | ~a_src_value) +
 						(m_src_value & a_src_value) +
 						(carry_in ? 1 : 0);
-					alu_out = lv;
+					alu_out = (unsigned int)lv;
 					alu_carry = (lv >> 32) ? 1 : 0;
 					break;
 				case 6: /* M-A-1 [SUB] */
@@ -2470,7 +2472,7 @@
 					lv = (long long)(m_src_value | ~a_src_value) +
 						m_src_value +
 						(carry_in ? 1 : 0);
-					alu_out = lv;
+					alu_out = (unsigned int)lv;
 					alu_carry = (lv >> 32) ? 1 : 0;
 					break;
 				case 010: /* M|A */
@@ -2478,7 +2480,7 @@
 					lv = (long long)(m_src_value |
 							 a_src_value) +
 						(carry_in ? 1 : 0);
-					alu_out = lv;
+					alu_out = (unsigned int)lv;
 					alu_carry = (lv >> 32) ? 1 : 0;
 					break;
 				case 011: /* M+A [ADD] */
@@ -2489,14 +2491,14 @@
 					lv = (long long)(m_src_value | a_src_value) +
 						(m_src_value & ~a_src_value) +
 						(carry_in ? 1 : 0);
-					alu_out = lv;
+					alu_out = (unsigned int)lv;
 					alu_carry = (lv >> 32) ? 1 : 0;
 					break;
 				case 013: /* (M|A)+M */
 					lv = (long long)(m_src_value | a_src_value) +
 						m_src_value +
 						(carry_in ? 1 : 0);
-					alu_out = lv;
+					alu_out = (unsigned int)lv;
 					alu_carry = (lv >> 32) ? 1 : 0;
 					break;
 				case 014: /* M */
@@ -2520,14 +2522,14 @@
 					lv = (long long)m_src_value +
 						(m_src_value & a_src_value) +
 						(carry_in ? 1 : 0);
-					alu_out = lv;
+					alu_out = (unsigned int)lv;
 					alu_carry = (lv >> 32) ? 1 : 0;
 					break;
 				case 016: /* M+(M|~A) */
 					lv = (long long)m_src_value +
 						(m_src_value | ~a_src_value) +
 						(carry_in ? 1 : 0);
-					alu_out = lv;
+					alu_out = (unsigned int)lv;
 					alu_carry = (lv >> 32) ? 1 : 0;
 					break;
 				case 017: /* M+M */




More information about the mit-cadr-cvs mailing list