diff options
| author | Jan Djärv | 2012-07-13 20:03:10 +0200 |
|---|---|---|
| committer | Jan Djärv | 2012-07-13 20:03:10 +0200 |
| commit | 0dc8cf5002ba3f79bf840de5b83c0f4f2e4e6279 (patch) | |
| tree | f30ab901e9631069f4c7b8a62a6b704a2e7c53d1 /src/nsimage.m | |
| parent | b55b9f85db85737b365e32585542046b349c1f2e (diff) | |
| download | emacs-0dc8cf5002ba3f79bf840de5b83c0f4f2e4e6279.tar.gz emacs-0dc8cf5002ba3f79bf840de5b83c0f4f2e4e6279.zip | |
Remove compiler warnings in objective-C files.
* nsfns.m (x_set_icon_name, ns_set_name_internal)
(ns_set_name_as_filename, ns_implicitly_set_icon_type)
(x_set_icon_type, ns_lisp_to_cursor_type, Fns_read_file_name)
(Fns_get_resource, Fns_set_resource, Fx_open_connection)
(Fns_font_name, Fns_perform_service)
(Fns_convert_utf8_nfd_to_nfc, ns_do_applescript)
(Fns_do_applescript, Fx_show_tip): Use SSDATA where appropriate.
(ns_set_name): Remove unused variable view.
(x_set_menu_bar_lines): Remove unused variable olines.
(x_set_tool_bar_lines): Remove unused variable root_window.
(Fns_list_colors): Put () around assignment in while statement.
(Fns_perform_service): Remove unused variable len.
(Fns_display_usable_bounds): Remove unused variable top.
(syms_of_nsfns): Remove unused variable i.
* nsfont.m (ns_get_family, ns_lang_to_script, ns_otf_to_script)
(ns_registry_to_script, ns_get_req_script, nsfont_open): Use SSDATA
where appropriate.
(ns_get_covering_families, ns_findfonts, nsfont_list_family): Put ()
around assignment in loop statement.
(nsfont_open): Remove unused variable i.
(nsfont_open): Remove unused variable len.
(nsfont_draw): Remove unused variable cs.
* nsimage.m (ns_load_image, allocInitFromFile): Use SSDATA where
appropriate.
(setXBMColor): Remove unused variable len.
(setPixmapData): Put () around assignment in loop statement.
* nsmenu.m (ns_update_menubar, ns_menu_show, process_dialog)
(initFromContents): Use SSDATA where appropriate.
(ns_update_menubar): Add braces to ambigous if-else.
(initWithTitle): Put () around assignment in if statement.
(ns_menu_show): Remove unused variables window and keymap.
(update_frame_tool_bar): Remove unused variable selected_p.
(initWithContentRect): Remove unused variable this_cmd_name.
* nsterm.h (menuDown): Add id as type to argument sender.
(ns_display_info_for_name): Add Lisp_Object argument.
(ns_term_init): Add Lisp_Object argument.
(ns_map_event_to_object): Add void argument.
(ns_string_from_pasteboard, ns_string_to_pasteboard): Add correct
prototype with arguments and only declare if __OBJC__.
(nxatoms_of_nsselect): Add void argument.
(ns_lisp_to_cursor_type): Add Lisp_Object argument.
(ns_alloc_autorelease_pool): Add void argument.
(ns_release_autorelease_pool): Add void* argument.
(ns_get_defaults_value): Add const char* argument.
* nsterm.m (uRect): Only define if NS_IMPL_GNUSTEP.
(x_free_frame_resources): Pass x_free_frame_resources to NSTRACE.
(ns_lisp_to_color, ns_string_to_lispmod, ns_term_init)
(ns_term_shutdown, requestService, initFrameFromEmacs): Use SSDATA
where appropriate.
(ns_exec_path, ns_load_path, changeFont): Put () around assignment used
as boolean expression.
(x_set_window_size): Remove unused variable toolbar.
(ns_get_color_default, ns_mod_to_lisp): Remove.
(ns_mouse_position): Remove unused variables xchar and ychar.
(ns_compute_glyph_string_overhangs): Remove unused variable face.
(ns_set_vertical_scroll_bar): Remove unused variable count.
(ns_delete_terminal): Remove unused variable i.
(ns_term_init): Remove unused variables r, g and b.
(mouseDown): Remove unused variable window.
(windowDidResize): Move definition of theWindow inside NS_IMPL_GNUSTEP.
(initFrameFromEmacs): Remove unused variable vbextra.
(mouseEntered): Remove unused variables p and dpyinfo.
(mouseExited): Remove unused variables p and r.
(ns_define_frame_cursor, ns_clear_frame_area)
(ns_draw_window_cursor, ns_initialize_display_info): Make static.
(menuDown): Assign [sender tag] to variable and cast the variable.
Diffstat (limited to 'src/nsimage.m')
| -rw-r--r-- | src/nsimage.m | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/nsimage.m b/src/nsimage.m index 82a176975ff..1479294948b 100644 --- a/src/nsimage.m +++ b/src/nsimage.m | |||
| @@ -96,7 +96,7 @@ ns_load_image (struct frame *f, struct image *img, | |||
| 96 | { | 96 | { |
| 97 | NSData *data; | 97 | NSData *data; |
| 98 | 98 | ||
| 99 | data = [NSData dataWithBytes: SDATA (spec_data) | 99 | data = [NSData dataWithBytes: SSDATA (spec_data) |
| 100 | length: SBYTES (spec_data)]; | 100 | length: SBYTES (spec_data)]; |
| 101 | eImg = [[EmacsImage alloc] initWithData: data]; | 101 | eImg = [[EmacsImage alloc] initWithData: data]; |
| 102 | [eImg setPixmapData]; | 102 | [eImg setPixmapData]; |
| @@ -171,7 +171,7 @@ static EmacsImage *ImageList = nil; | |||
| 171 | 171 | ||
| 172 | /* look for an existing image of the same name */ | 172 | /* look for an existing image of the same name */ |
| 173 | while (image != nil && | 173 | while (image != nil && |
| 174 | [[image name] compare: [NSString stringWithUTF8String: SDATA (file)]] | 174 | [[image name] compare: [NSString stringWithUTF8String: SSDATA (file)]] |
| 175 | != NSOrderedSame) | 175 | != NSOrderedSame) |
| 176 | image = [image imageListNext]; | 176 | image = [image imageListNext]; |
| 177 | 177 | ||
| @@ -187,7 +187,7 @@ static EmacsImage *ImageList = nil; | |||
| 187 | return nil; | 187 | return nil; |
| 188 | 188 | ||
| 189 | image = [[EmacsImage alloc] initByReferencingFile: | 189 | image = [[EmacsImage alloc] initByReferencingFile: |
| 190 | [NSString stringWithUTF8String: SDATA (found)]]; | 190 | [NSString stringWithUTF8String: SSDATA (found)]]; |
| 191 | 191 | ||
| 192 | #if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 | 192 | #if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 |
| 193 | imgRep = [NSBitmapImageRep imageRepWithData:[image TIFFRepresentation]]; | 193 | imgRep = [NSBitmapImageRep imageRepWithData:[image TIFFRepresentation]]; |
| @@ -205,7 +205,7 @@ static EmacsImage *ImageList = nil; | |||
| 205 | [image setScalesWhenResized: YES]; | 205 | [image setScalesWhenResized: YES]; |
| 206 | [image setSize: NSMakeSize([imgRep pixelsWide], [imgRep pixelsHigh])]; | 206 | [image setSize: NSMakeSize([imgRep pixelsWide], [imgRep pixelsHigh])]; |
| 207 | 207 | ||
| 208 | [image setName: [NSString stringWithUTF8String: SDATA (file)]]; | 208 | [image setName: [NSString stringWithUTF8String: SSDATA (file)]]; |
| 209 | [image reference]; | 209 | [image reference]; |
| 210 | ImageList = [image imageListSetNext: ImageList]; | 210 | ImageList = [image imageListSetNext: ImageList]; |
| 211 | 211 | ||
| @@ -334,7 +334,6 @@ static EmacsImage *ImageList = nil; | |||
| 334 | - setXBMColor: (NSColor *)color | 334 | - setXBMColor: (NSColor *)color |
| 335 | { | 335 | { |
| 336 | NSSize s = [self size]; | 336 | NSSize s = [self size]; |
| 337 | int len = (int) s.width * s.height; | ||
| 338 | unsigned char *planes[5]; | 337 | unsigned char *planes[5]; |
| 339 | CGFloat r, g, b, a; | 338 | CGFloat r, g, b, a; |
| 340 | NSColor *rgbColor; | 339 | NSColor *rgbColor; |
| @@ -400,7 +399,7 @@ static EmacsImage *ImageList = nil; | |||
| 400 | NSImageRep *rep; | 399 | NSImageRep *rep; |
| 401 | 400 | ||
| 402 | reps = [[self representations] objectEnumerator]; | 401 | reps = [[self representations] objectEnumerator]; |
| 403 | while (rep = (NSImageRep *) [reps nextObject]) | 402 | while ((rep = (NSImageRep *) [reps nextObject])) |
| 404 | { | 403 | { |
| 405 | if ([rep respondsToSelector: @selector (getBitmapDataPlanes:)]) | 404 | if ([rep respondsToSelector: @selector (getBitmapDataPlanes:)]) |
| 406 | { | 405 | { |