[Libreoffice-commits] .: 3 commits - extensions/source slideshow/source solenv/gbuild
Michael Stahl
mst at kemper.freedesktop.org
Wed Jan 4 09:04:34 PST 2012
extensions/source/macosx/spotlight/GetMetadataForFile.m | 2
extensions/source/macosx/spotlight/OOoContentDataParser.m | 11 ++
extensions/source/macosx/spotlight/OOoMetaDataParser.m | 9 ++
extensions/source/macosx/spotlight/ioapi.m | 56 +++++++-------
extensions/source/macosx/spotlight/main.m | 3
slideshow/source/engine/OGLTrans/mac/aquaOpenGLView.m | 1
solenv/gbuild/platform/macosx.mk | 2
7 files changed, 53 insertions(+), 31 deletions(-)
New commits:
commit 49697f6d54cef37bff44898c9fbf46b5688073c8
Author: Michael Stahl <mstahl at redhat.com>
Date: Wed Jan 4 17:59:05 2012 +0100
gbuild: macosx.mk: enable -Werror for ObjC files
diff --git a/solenv/gbuild/platform/macosx.mk b/solenv/gbuild/platform/macosx.mk
index ef82a82..2c61e8f 100644
--- a/solenv/gbuild/platform/macosx.mk
+++ b/solenv/gbuild/platform/macosx.mk
@@ -158,7 +158,7 @@ endef
gb_LinkTarget_CFLAGS := $(gb_CFLAGS) $(gb_CFLAGS_WERROR)
gb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS) $(gb_CXXFLAGS_WERROR)
gb_LinkTarget_OBJCXXFLAGS := $(gb_CXXFLAGS) $(gb_CXXFLAGS_WERROR) $(gb_OBJCXXFLAGS)
-gb_LinkTarget_OBJCFLAGS := $(gb_CFLAGS) $(gb_OBJCFLAGS) $(gb_COMPILEROPTFLAGS)
+gb_LinkTarget_OBJCFLAGS := $(gb_CFLAGS) $(gb_CFLAGS_WERROR) $(gb_OBJCFLAGS) $(gb_COMPILEROPTFLAGS)
ifeq ($(gb_SYMBOL),$(true))
gb_LinkTarget_CFLAGS += -g
commit 2f2c747ffcabd906c3451b0ee20758b07c0f1cce
Author: Michael Stahl <mstahl at redhat.com>
Date: Wed Jan 4 17:57:53 2012 +0100
extensions: fix unused param warnings in ObjC files
The namespace handling in the spotlight plugin XML parser looks broken,
added some FIXMEs for that.
diff --git a/extensions/source/macosx/spotlight/GetMetadataForFile.m b/extensions/source/macosx/spotlight/GetMetadataForFile.m
index e47603d..f93449a 100644
--- a/extensions/source/macosx/spotlight/GetMetadataForFile.m
+++ b/extensions/source/macosx/spotlight/GetMetadataForFile.m
@@ -48,7 +48,7 @@ typedef int NSColorRenderingIntent;
and return it as a dictionary
----------------------------------------------------------------------------- */
-Boolean GetMetadataForFile(void* thisInterface,
+Boolean GetMetadataForFile(void* /*thisInterface*/,
CFMutableDictionaryRef attributes,
CFStringRef contentTypeUTI,
CFStringRef pathToFile)
diff --git a/extensions/source/macosx/spotlight/OOoContentDataParser.m b/extensions/source/macosx/spotlight/OOoContentDataParser.m
index a35b219..d5abd1d 100644
--- a/extensions/source/macosx/spotlight/OOoContentDataParser.m
+++ b/extensions/source/macosx/spotlight/OOoContentDataParser.m
@@ -78,6 +78,11 @@ typedef int NSColorRenderingIntent;
- (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qualifiedName attributes:(NSDictionary *)attributeDict
{
+ (void) parser; // unused
+ (void) namespaceURI; // FIXME this should not be ignored but should be used
+ // instead of text: prefix in the comparison below!
+ (void) qualifiedName; // unused
+ (void) attributeDict; // unused
// all text content is stored inside <text:p> elements
if ([elementName isEqualToString:@"text:p"] == YES) {
runningTextContent = [NSMutableString new];
@@ -92,6 +97,10 @@ typedef int NSColorRenderingIntent;
- (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName
{
+ (void) parser; // unused
+ (void) elementName; // unused
+ (void) namespaceURI; // unused
+ (void) qName; // unused
if (shouldReadCharacters == TRUE) {
if (textContent == nil) {
textContent = [NSMutableString new];
@@ -109,6 +118,7 @@ typedef int NSColorRenderingIntent;
- (void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string
{
+ (void) parser; // unused
if (shouldReadCharacters == NO) {
return;
}
@@ -138,6 +148,7 @@ typedef int NSColorRenderingIntent;
- (void)parserDidEndDocument:(NSXMLParser *)parser
{
+ (void) parser; // unused
if (textContent != nil && [textContent length] > 0) {
[mdiValues setObject:[NSString stringWithString:textContent] forKey:(NSString*)kMDItemTextContent];
[textContent release];
diff --git a/extensions/source/macosx/spotlight/OOoMetaDataParser.m b/extensions/source/macosx/spotlight/OOoMetaDataParser.m
index cb26f91..cd69772 100644
--- a/extensions/source/macosx/spotlight/OOoMetaDataParser.m
+++ b/extensions/source/macosx/spotlight/OOoMetaDataParser.m
@@ -48,6 +48,7 @@ static NSDictionary *metaXML2MDIKeys;
if (isInitialized == NO) {
//set up the meta elements with only one value
NSMutableSet *temp = [NSMutableSet new];
+//FIXME these should use namespace URIs and not prefixes
[temp addObject:@"dc:title"];
[temp addObject:@"dc:description"];
[temp addObject:@"meta:user-defined"];
@@ -121,6 +122,10 @@ static NSDictionary *metaXML2MDIKeys;
- (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qualifiedName attributes:(NSDictionary *)attributeDict
{
+ (void) parser; // unused
+ (void) namespaceURI; // FIXME this should not be ignored but should be used
+ // instead of meta: prefix in the comparison below!
+ (void) qualifiedName; // unused
// NSLog(@"<%@>", elementName);
if ([singleValueXMLElements containsObject:elementName] == YES) {
shouldReadCharacters = YES;
@@ -146,6 +151,9 @@ static NSDictionary *metaXML2MDIKeys;
- (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName
{
+ (void) parser; // unused
+ (void) namespaceURI; // unused
+ (void) qName; // unused
// NSLog(@"</%@>", elementName);
if (shouldReadCharacters == YES) {
NSString *mdiName = nil;
@@ -190,6 +198,7 @@ static NSDictionary *metaXML2MDIKeys;
- (void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string
{
+ (void) parser; // unused
// NSLog(@"%@", string);
if (shouldReadCharacters == NO) {
return;
diff --git a/extensions/source/macosx/spotlight/ioapi.m b/extensions/source/macosx/spotlight/ioapi.m
index fb9d53f..683eb97 100644
--- a/extensions/source/macosx/spotlight/ioapi.m
+++ b/extensions/source/macosx/spotlight/ioapi.m
@@ -93,10 +93,10 @@ int ZCALLBACK ferror_file_func OF((
voidpf stream));
-voidpf ZCALLBACK fopen_file_func (opaque, filename, mode)
- voidpf opaque;
- const char* filename;
- int mode;
+voidpf ZCALLBACK fopen_file_func(
+ voidpf /*opaque*/,
+ const char* filename,
+ int mode)
{
FILE* file = NULL;
const char* mode_fopen = NULL;
@@ -115,11 +115,11 @@ voidpf ZCALLBACK fopen_file_func (opaque, filename, mode)
}
-uLong ZCALLBACK fread_file_func (opaque, stream, buf, size)
- voidpf opaque;
- voidpf stream;
- void* buf;
- uLong size;
+uLong ZCALLBACK fread_file_func(
+ voidpf /*opaque*/,
+ voidpf stream,
+ void* buf,
+ uLong size)
{
uLong ret;
ret = (uLong)fread(buf, 1, (size_t)size, (FILE *)stream);
@@ -127,31 +127,31 @@ uLong ZCALLBACK fread_file_func (opaque, stream, buf, size)
}
-uLong ZCALLBACK fwrite_file_func (opaque, stream, buf, size)
- voidpf opaque;
- voidpf stream;
- const void* buf;
- uLong size;
+uLong ZCALLBACK fwrite_file_func(
+ voidpf /*opaque*/,
+ voidpf stream,
+ const void* buf,
+ uLong size)
{
uLong ret;
ret = (uLong)fwrite(buf, 1, (size_t)size, (FILE *)stream);
return ret;
}
-long ZCALLBACK ftell_file_func (opaque, stream)
- voidpf opaque;
- voidpf stream;
+long ZCALLBACK ftell_file_func(
+ voidpf /*opaque*/,
+ voidpf stream)
{
long ret;
ret = ftell((FILE *)stream);
return ret;
}
-long ZCALLBACK fseek_file_func (opaque, stream, offset, origin)
- voidpf opaque;
- voidpf stream;
- uLong offset;
- int origin;
+long ZCALLBACK fseek_file_func(
+ voidpf /*opaque*/,
+ voidpf stream,
+ uLong offset,
+ int origin)
{
int fseek_origin=0;
long ret;
@@ -173,18 +173,18 @@ long ZCALLBACK fseek_file_func (opaque, stream, offset, origin)
return ret;
}
-int ZCALLBACK fclose_file_func (opaque, stream)
- voidpf opaque;
- voidpf stream;
+int ZCALLBACK fclose_file_func(
+ voidpf /*opaque*/,
+ voidpf stream)
{
int ret;
ret = fclose((FILE *)stream);
return ret;
}
-int ZCALLBACK ferror_file_func (opaque, stream)
- voidpf opaque;
- voidpf stream;
+int ZCALLBACK ferror_file_func(
+ voidpf /*opaque*/,
+ voidpf stream)
{
int ret;
ret = ferror((FILE *)stream);
diff --git a/extensions/source/macosx/spotlight/main.m b/extensions/source/macosx/spotlight/main.m
index 74bcca9..2fa2723 100644
--- a/extensions/source/macosx/spotlight/main.m
+++ b/extensions/source/macosx/spotlight/main.m
@@ -206,7 +206,8 @@ ULONG MetadataImporterPluginRelease(void *thisInstance)
// -----------------------------------------------------------------------------
// Implementation of the factory function for this type.
//
-void *MetadataImporterPluginFactory(CFAllocatorRef allocator,CFUUIDRef typeID)
+void *
+MetadataImporterPluginFactory(CFAllocatorRef /*allocator*/, CFUUIDRef typeID)
{
MetadataImporterPluginType *result;
CFUUIDRef uuid;
commit c24552ed05c7840a8359143d9af48f25fef21999
Author: Michael Stahl <mstahl at redhat.com>
Date: Wed Jan 4 17:57:09 2012 +0100
slideshow: fix unused param warnings in ObjC files
diff --git a/slideshow/source/engine/OGLTrans/mac/aquaOpenGLView.m b/slideshow/source/engine/OGLTrans/mac/aquaOpenGLView.m
index 56c2e09..44e4f6d 100644
--- a/slideshow/source/engine/OGLTrans/mac/aquaOpenGLView.m
+++ b/slideshow/source/engine/OGLTrans/mac/aquaOpenGLView.m
@@ -154,6 +154,7 @@ typedef int NSColorRenderingIntent;
- (void) _surfaceNeedsUpdate:(NSNotification*)notification
{
+ (void) notification; // unused
[self update];
}
More information about the Libreoffice-commits
mailing list