diff options
| -rw-r--r-- | cocoa/PlatCocoa.mm | 25 | ||||
| -rw-r--r-- | cocoa/ScintillaCocoa.mm | 12 | ||||
| -rw-r--r-- | cocoa/ScintillaView.mm | 11 | 
3 files changed, 33 insertions, 15 deletions
| diff --git a/cocoa/PlatCocoa.mm b/cocoa/PlatCocoa.mm index 87cac5ea2..7e547e67d 100644 --- a/cocoa/PlatCocoa.mm +++ b/cocoa/PlatCocoa.mm @@ -129,7 +129,7 @@ void Scintilla::Palette::WantFind(ColourPair &cp, bool want)  //-------------------------------------------------------------------------------------------------- -void Scintilla::Palette::Allocate(Window& w) +void Scintilla::Palette::Allocate(Window&)  {    // Nothing to allocate as we don't use palettes.  } @@ -157,7 +157,7 @@ static int FontCharacterSet(Font &f) {   * Creates a CTFontRef with the given properties.   */  void Font::Create(const char *faceName, int characterSet, int size, bool bold, bool italic,  -                  int extraFontFlag) +                  int /* extraFontFlag */)  {  	Release(); @@ -238,7 +238,7 @@ bool SurfaceImpl::Initialised()  //-------------------------------------------------------------------------------------------------- -void SurfaceImpl::Init(WindowID wid) +void SurfaceImpl::Init(WindowID)  {    // To be able to draw, the surface must get a CGContext handle.  We save the graphics port,    // then aquire/release the context on an as-need basis (see above). @@ -251,7 +251,7 @@ void SurfaceImpl::Init(WindowID wid)  //-------------------------------------------------------------------------------------------------- -void SurfaceImpl::Init(SurfaceID sid, WindowID wid) +void SurfaceImpl::Init(SurfaceID sid, WindowID)  {    Release();    gc = reinterpret_cast<CGContextRef>(sid); @@ -261,7 +261,7 @@ void SurfaceImpl::Init(SurfaceID sid, WindowID wid)  //-------------------------------------------------------------------------------------------------- -void SurfaceImpl::InitPixMap(int width, int height, Surface* surface_, WindowID wid) +void SurfaceImpl::InitPixMap(int width, int height, Surface* /* surface_ */, WindowID /* wid */)  {    Release(); @@ -702,7 +702,7 @@ static CGImageRef ImageFromRGBA(int width, int height, const unsigned char *pixe  	return image;  } -void SurfaceImpl::DrawRGBAImage(PRectangle rc, int width, int height, const unsigned char *pixelsImage) { +void SurfaceImpl::DrawRGBAImage(PRectangle /* rc */, int width, int height, const unsigned char *pixelsImage) {  	CGImageRef image = ImageFromRGBA(width, height, pixelsImage, true);  	if (image) {  		//CGContextSaveGState(gc); @@ -1426,7 +1426,7 @@ public:    {      lines.clear();    } -  void Add(int index, int type, char* str) +  void Add(int /* index */, int type, char* str)    {      lines.push_back(RowData(type, str));    } @@ -1541,6 +1541,7 @@ public:  - (void) doubleClick: (id) sender  { +#pragma unused(sender)    if (box)    {      box->DoubleClick(); @@ -1945,7 +1946,7 @@ void Menu::Destroy()  //-------------------------------------------------------------------------------------------------- -void Menu::Show(Point pt, Window &) +void Menu::Show(Point, Window &)  {    // Cocoa menus are handled a bit differently. We only create the menu. The framework    // takes care to show it properly. @@ -2094,9 +2095,9 @@ bool Platform::IsDBCSLeadByte(int codePage, char ch)  //-------------------------------------------------------------------------------------------------- -int Platform::DBCSCharLength(int codePage, const char* s) +int Platform::DBCSCharLength(int /* codePage */, const char* /* s */)  { -  // No support for DBCS. +  // DBCS no longer uses this.    return 1;  } @@ -2104,7 +2105,6 @@ int Platform::DBCSCharLength(int codePage, const char* s)  int Platform::DBCSCharMaxLength()  { -  // No support for DBCS.    return 2;  } @@ -2197,8 +2197,9 @@ int Platform::Clamp(int val, int minVal, int maxVal)   * @param modulePath The path to the module to load.   * @return A library instance or NULL if the module could not be found or another problem occured.   */ -DynamicLibrary* DynamicLibrary::Load(const char* modulePath) +DynamicLibrary* DynamicLibrary::Load(const char* /* modulePath */)  { +  // Not implemented.    return NULL;  } diff --git a/cocoa/ScintillaCocoa.mm b/cocoa/ScintillaCocoa.mm index 5e93d7f94..518447851 100644 --- a/cocoa/ScintillaCocoa.mm +++ b/cocoa/ScintillaCocoa.mm @@ -177,6 +177,7 @@ static const KeyToCommand macMapDefault[] =   */  - (void) idleTimerFired: (NSTimer*) timer  { +#pragma unused(timer)    // Idle timer event.    // Post a new idle notification, which gets executed when the run loop is idle.    // Since we are coalescing on name and sender there will always be only one actual notification @@ -196,6 +197,7 @@ static const KeyToCommand macMapDefault[] =   */  - (void) idleTriggered: (NSNotification*) notification  { +#pragma unused(notification)    reinterpret_cast<ScintillaCocoa*>(mTarget)->IdleTimerFired();  } @@ -698,6 +700,7 @@ void ScintillaCocoa::Paste(bool forceRectangular)  //--------------------------------------------------------------------------------------------------  void ScintillaCocoa::CTPaint(void* gc, NSRect rc) { +#pragma unused(rc)      Surface *surfaceWindow = Surface::Allocate();      if (surfaceWindow) {          surfaceWindow->Init(gc, wMain.GetID()); @@ -834,7 +837,7 @@ NSPoint ScintillaCocoa::GetCaretPosition()  // ------------------------------------------------------------------------------------------------- -#pragma segment Drag +#pragma mark Drag  /**   * Triggered by the tick timer on a regular basis to scroll the content during a drag operation. @@ -1102,6 +1105,7 @@ NSDragOperation ScintillaCocoa::DraggingUpdated(id <NSDraggingInfo> info)   */  void ScintillaCocoa::DraggingExited(id <NSDraggingInfo> info)  { +#pragma unused(info)    SetDragPosition(SelectionPosition(invalidPosition));    inDragDrop = ddNone;  } @@ -1349,6 +1353,7 @@ void ScintillaCocoa::SetHorizontalScrollPos()   */  bool ScintillaCocoa::ModifyScrollBars(int nMax, int nPage)  { +#pragma unused(nPage)    // Input values are given in lines, not pixels, so we have to convert.    int lineHeight = static_cast<int>(WndProc(SCI_TEXTHEIGHT, 0, 0));    PRectangle bounds = GetTextRectangle(); @@ -1534,6 +1539,7 @@ bool ScintillaCocoa::CanRedo()  void ScintillaCocoa::TimerFired(NSTimer* timer)  { +#pragma unused(timer)    Tick();    DragScroll();  } @@ -1693,7 +1699,7 @@ void ScintillaCocoa::MouseEntered(NSEvent* event)  //-------------------------------------------------------------------------------------------------- -void ScintillaCocoa::MouseExited(NSEvent* event) +void ScintillaCocoa::MouseExited(NSEvent* /* event */)  {    // Nothing to do here.  } @@ -1797,7 +1803,7 @@ void ScintillaCocoa::Redo()  /**   * Creates and returns a popup menu, which is then displayed by the Cocoa framework.   */ -NSMenu* ScintillaCocoa::CreateContextMenu(NSEvent* event) +NSMenu* ScintillaCocoa::CreateContextMenu(NSEvent* /* event */)  {    // Call ScintillaBase to create the context menu.    ContextMenu(Point(0, 0)); diff --git a/cocoa/ScintillaView.mm b/cocoa/ScintillaView.mm index 64b5008c6..0659eb2c2 100644 --- a/cocoa/ScintillaView.mm +++ b/cocoa/ScintillaView.mm @@ -158,6 +158,7 @@ NSString *SCIUpdateUINotification = @"SCIUpdateUI";   */  - (BOOL) acceptsFirstMouse: (NSEvent *) theEvent  { +#pragma unused(theEvent)    return YES;  } @@ -484,6 +485,7 @@ NSString *SCIUpdateUINotification = @"SCIUpdateUI";  - (BOOL) prepareForDragOperation: (id <NSDraggingInfo>) sender  { +#pragma unused(sender)    return YES;  } @@ -533,36 +535,43 @@ NSString *SCIUpdateUINotification = @"SCIUpdateUI";  - (void) selectAll: (id) sender  { +#pragma unused(sender)    mOwner.backend->SelectAll();  }  - (void) deleteBackward: (id) sender  { +#pragma unused(sender)    mOwner.backend->DeleteBackward();  }  - (void) cut: (id) sender  { +#pragma unused(sender)    mOwner.backend->Cut();  }  - (void) copy: (id) sender  { +#pragma unused(sender)    mOwner.backend->Copy();  }  - (void) paste: (id) sender  { +#pragma unused(sender)    mOwner.backend->Paste();  }  - (void) undo: (id) sender  { +#pragma unused(sender)    mOwner.backend->Undo();  }  - (void) redo: (id) sender  { +#pragma unused(sender)    mOwner.backend->Redo();  } @@ -834,12 +843,14 @@ static void notification(intptr_t windowid, unsigned int iMessage, uintptr_t wPa  //--------------------------------------------------------------------------------------------------  - (void) applicationDidResignActive: (NSNotification *)note { +#pragma unused(note)      mBackend->ActiveStateChanged(false);  }  //--------------------------------------------------------------------------------------------------  - (void) applicationDidBecomeActive: (NSNotification *)note { +#pragma unused(note)      mBackend->ActiveStateChanged(true);  } | 
