changeset 69963:b25e279aa874

(get_flavor_type_from_symbol): Remove unused variable `val'. (get_scrap_private_timestamp, x_get_foreign_selection) (copy_scrap_flavor_data): Add explicit braces to avoid ambiguous `else'. (Fmac_process_deferred_apple_events): Remove unused variables `keyword', `reply', `apple_event', `count', and `err'.
author YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
date Wed, 12 Apr 2006 08:08:30 +0000
parents adc2f96580af
children 321089786c7b
files src/macselect.c
diffstat 1 files changed, 38 insertions(+), 36 deletions(-) [+]
line wrap: on
line diff
--- a/src/macselect.c	Wed Apr 12 08:07:48 2006 +0000
+++ b/src/macselect.c	Wed Apr 12 08:08:30 2006 +0000
@@ -153,7 +153,6 @@
 get_flavor_type_from_symbol (sym)
      Lisp_Object sym;
 {
-  ScrapFlavorType val;
   Lisp_Object str = Fget (sym, Qmac_ostype);
 
   if (STRINGP (str) && SBYTES (str) == 4)
@@ -322,17 +321,19 @@
 
   err = GetScrapFlavorFlags (scrap, SCRAP_FLAVOR_TYPE_EMACS_TIMESTAMP, &flags);
   if (err == noErr)
-    if (!(flags & kScrapFlavorMaskSenderOnly))
-      err = noTypeErr;
-    else
-      {
-	Size size = sizeof (*timestamp);
+    {
+      if (!(flags & kScrapFlavorMaskSenderOnly))
+	err = noTypeErr;
+      else
+	{
+	  Size size = sizeof (*timestamp);
 
-	err = GetScrapFlavorData (scrap, SCRAP_FLAVOR_TYPE_EMACS_TIMESTAMP,
-				  &size, timestamp);
-	if (err == noErr && size != sizeof (*timestamp))
-	  err = noTypeErr;
-      }
+	  err = GetScrapFlavorData (scrap, SCRAP_FLAVOR_TYPE_EMACS_TIMESTAMP,
+				    &size, timestamp);
+	  if (err == noErr && size != sizeof (*timestamp))
+	    err = noTypeErr;
+	}
+    }
 #else  /* !TARGET_API_MAC_CARBON */
   Handle handle;
   SInt32 size, offset;
@@ -683,18 +684,20 @@
 
   err = get_scrap_from_symbol (selection_symbol, 0, &scrap);
   if (err == noErr && scrap)
-    if (EQ (target_type, QTARGETS))
-      {
-	result = get_scrap_target_type_list (scrap);
-	result = Fvconcat (1, &result);
-      }
-    else
-      {
-	result = get_scrap_string (scrap, target_type);
-	if (STRINGP (result))
-	  Fput_text_property (make_number (0), make_number (SBYTES (result)),
-			      Qforeign_selection, target_type, result);
-      }
+    {
+      if (EQ (target_type, QTARGETS))
+	{
+	  result = get_scrap_target_type_list (scrap);
+	  result = Fvconcat (1, &result);
+	}
+      else
+	{
+	  result = get_scrap_string (scrap, target_type);
+	  if (STRINGP (result))
+	    Fput_text_property (make_number (0), make_number (SBYTES (result)),
+				Qforeign_selection, target_type, result);
+	}
+    }
 
   UNBLOCK_INPUT;
 
@@ -1009,7 +1012,7 @@
   /* Mac OS 10.3 Xcode manual says AESuspendTheCurrentEvent makes
      copies of the Apple event and the reply, but Mac OS 10.4 Xcode
      manual says it doesn't.  Anyway we create copies of them and save
-     it in `deferred_apple_events'.  */
+     them in `deferred_apple_events'.  */
   if (err == noErr)
     {
       if (deferred_apple_events.buf == NULL)
@@ -1123,11 +1126,8 @@
        doc: /* Process Apple events that are deferred at the startup time.  */)
   ()
 {
-  OSErr err;
   Lisp_Object result = Qnil;
-  long i, count;
-  AppleEvent apple_event, reply;
-  AEKeyword keyword;
+  long i;
 
   if (mac_ready_for_apple_events)
     return Qnil;
@@ -1207,14 +1207,16 @@
 	break;
     }
   if (err == noErr)
-    if (buf == NULL)
-      err = memFullErr;
-    else
-      {
-	err = PutScrapFlavor (to_scrap, flavor_type, kScrapFlavorMaskNone,
-			      size, buf);
-	xfree (buf);
-      }
+    {
+      if (buf == NULL)
+	err = memFullErr;
+      else
+	{
+	  err = PutScrapFlavor (to_scrap, flavor_type, kScrapFlavorMaskNone,
+				size, buf);
+	  xfree (buf);
+	}
+    }
 
   return err;
 }