fix more unused parameters and variables warnings

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50051 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-11-18 17:53:04 +00:00
parent 6e1609b1e0
commit 31c1cbc7bc
8 changed files with 71 additions and 63 deletions

View File

@@ -1547,6 +1547,8 @@ WXHBITMAP wxBitmap::GetHBITMAP(WXHBITMAP* mask) const
#if !wxMAC_USE_CORE_GRAPHICS
return WXHBITMAP(M_BITMAPDATA->GetHBITMAP((GWorldPtr*)mask));
#else
wxUnusedVar(mask);
return WXHBITMAP(M_BITMAPDATA->GetBitmapContext());
#endif
}

View File

@@ -34,11 +34,6 @@
#include <string.h>
// the trace mask we use with wxLogTrace() - call
// wxLog::AddTraceMask(TRACE_CLIPBOARD) to enable the trace messages from here
// (there will be a *lot* of them!)
static const wxChar *TRACE_CLIPBOARD = wxT("clipboard");
IMPLEMENT_DYNAMIC_CLASS(wxClipboard, wxObject)
wxClipboard::wxClipboard()

View File

@@ -226,7 +226,6 @@ wxBitmap wxWindowDC::DoGetAsBitmap(const wxRect *subrect) const
wxBitmap bmp = wxBitmap(width, height, 32);
wxAlphaPixelData pixData(bmp, wxPoint(0,0), wxSize(width, height));
pixData.UseAlpha();
wxAlphaPixelData::Iterator p(pixData);
for (int y=0; y<height; y++) {
wxAlphaPixelData::Iterator rowStart = p;

View File

@@ -212,8 +212,10 @@ wxDropSource::~wxDropSource()
{
}
OSStatus wxMacPromiseKeeper( PasteboardRef inPasteboard, PasteboardItemID inItem, CFStringRef inFlavorType,
void *inContext )
OSStatus wxMacPromiseKeeper(PasteboardRef WXUNUSED(inPasteboard),
PasteboardItemID WXUNUSED(inItem),
CFStringRef WXUNUSED(inFlavorType),
void * WXUNUSED(inContext))
{
OSStatus err = noErr;
@@ -241,20 +243,20 @@ wxDragResult wxDropSource::DoDragDrop(int flags)
return wxDragNone;
// we add a dummy promise keeper because of strange messages when linking against carbon debug
err = PasteboardSetPromiseKeeper( pasteboard, wxMacPromiseKeeper, this );
err = PasteboardSetPromiseKeeper( pasteboard, wxMacPromiseKeeper, this );
if ( err != noErr )
{
CFRelease( pasteboard );
return wxDragNone;
}
err = PasteboardClear( pasteboard );
err = PasteboardClear( pasteboard );
if ( err != noErr )
{
CFRelease( pasteboard );
return wxDragNone;
}
PasteboardSynchronize( pasteboard );
PasteboardSynchronize( pasteboard );
m_data->AddToPasteboard( pasteboard, 1 );

View File

@@ -574,7 +574,9 @@ wxInt32 wxMenu::MacHandleCommandProcess( wxMenuItem* item, int id, wxWindow* tar
return result;
}
wxInt32 wxMenu::MacHandleCommandUpdateStatus( wxMenuItem* item, int id, wxWindow* targetWindow )
wxInt32 wxMenu::MacHandleCommandUpdateStatus(wxMenuItem* WXUNUSED(item),
int id,
wxWindow* targetWindow)
{
OSStatus result = eventNotHandledErr ;
wxUpdateUIEvent event(id);

View File

@@ -204,8 +204,8 @@ void wxMetafileRefData::UpdateDocumentFromData()
{
CGPDFPageRef page = CGPDFDocumentGetPage( m_pdfDoc, 1 );
CGRect rect = CGPDFPageGetBoxRect ( page, kCGPDFMediaBox);
m_width = rect.size.width;
m_height = rect.size.height;
m_width = wx_static_cast(int, rect.size.width);
m_height = wx_static_cast(int, rect.size.height);
}
}
#endif
@@ -283,7 +283,8 @@ void wxMetafile::SetPICT(void* pictHandle)
wxCFRef<CGDataProviderRef> provider(UMACGDataProviderCreateWithCFData(data));
QDPictRef pictRef = QDPictCreateWithProvider(provider);
CGRect rect = QDPictGetBounds(pictRef);
m_refData = new wxMetafileRefData( rect.size.width, rect.size.height );
m_refData = new wxMetafileRefData(wx_static_cast(int, rect.size.width),
wx_static_cast(int, rect.size.height));
QDPictDrawToCGContext( ((wxMetafileRefData*) m_refData)->GetContext(), rect, pictRef );
CFRelease( data );
QDPictRelease( pictRef );

View File

@@ -1794,6 +1794,11 @@ void wxMacMLTEControl::SetBackground( const wxBrush &brush )
TXNSetBackground( m_txn , &tback );
}
static inline int wxConvertToTXN(int x)
{
return wx_static_cast(int, x / 254.0 * 72 + 0.5);
}
void wxMacMLTEControl::TXNSetAttribute( const wxTextAttr& style , long from , long to )
{
TXNTypeAttributes typeAttr[4] ;
@@ -1869,11 +1874,11 @@ void wxMacMLTEControl::TXNSetAttribute( const wxTextAttr& style , long from , lo
&controlTags[controlAttrCount], &controlData[controlAttrCount]) );
if ( style.HasLeftIndent() )
{
margins.leftMargin = style.GetLeftIndent() / 254.0 * 72 + 0.5;
margins.leftMargin = wxConvertToTXN(style.GetLeftIndent());
}
if ( style.HasRightIndent() )
{
margins.rightMargin = style.GetRightIndent() / 254.0 * 72 + 0.5;
margins.rightMargin = wxConvertToTXN(style.GetRightIndent());
}
controlAttrCount++ ;
}
@@ -1884,7 +1889,7 @@ void wxMacMLTEControl::TXNSetAttribute( const wxTextAttr& style , long from , lo
// unfortunately Mac only applies a tab distance, not individually different tabs
controlTags[controlAttrCount] = kTXNTabSettingsTag;
if ( tabarray.size() > 0 )
controlData[controlAttrCount].tabValue.value = tabarray[0] / 254.0 * 72 + 0.5;
controlData[controlAttrCount].tabValue.value = wxConvertToTXN(tabarray[0]);
else
controlData[controlAttrCount].tabValue.value = 72 ;

View File

@@ -584,7 +584,9 @@ size_t UMAPutBytesCFRefCallback( void *info, const void *bytes, size_t count )
return count;
}
void UMAReleaseCFDataProviderCallback( void *info, const void *data, size_t count )
void UMAReleaseCFDataProviderCallback(void *info,
const void *WXUNUSED(data),
size_t WXUNUSED(count))
{
if ( info )
CFRelease( (CFDataRef) info );