[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a

Maximiliano Curia maxy at moszumanska.debian.org
Thu Jul 13 17:38:52 UTC 2017


Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=b2d16d3

The following commit has been merged in the master branch:
commit b2d16d343fb761fe406746954b0abcc0bcba3bc3
Author: Andreas Huggel <ahuggel at gmx.net>
Date:   Sat Oct 6 04:46:22 2007 +0000

    Fixed more g++ warnings.
---
 xmpsdk/src/ExpatAdapter.cpp      | 27 ----------------------
 xmpsdk/src/ParseRDF.cpp          | 48 ----------------------------------------
 xmpsdk/src/XMPMeta-Parse.cpp     |  2 +-
 xmpsdk/src/XMPMeta-Serialize.cpp | 14 ------------
 xmpsdk/src/XMPUtils.cpp          | 22 +++++++++---------
 5 files changed, 12 insertions(+), 101 deletions(-)

diff --git a/xmpsdk/src/ExpatAdapter.cpp b/xmpsdk/src/ExpatAdapter.cpp
index d383c98..fee3385 100644
--- a/xmpsdk/src/ExpatAdapter.cpp
+++ b/xmpsdk/src/ExpatAdapter.cpp
@@ -43,8 +43,6 @@ static void EndCdataSectionHandler       ( void * userData );
 static void ProcessingInstructionHandler ( void * userData, XMP_StringPtr target, XMP_StringPtr data );
 static void CommentHandler               ( void * userData, XMP_StringPtr comment );
 
-static void DefaultHandler               ( void * userData, XMP_StringPtr data, int len );
-
 // =================================================================================================
 // =================================================================================================
 
@@ -438,28 +436,3 @@ static void CommentHandler ( void * userData, XMP_StringPtr comment )
 }	// CommentHandler
 
 // =================================================================================================
-
-static void DefaultHandler ( void * userData, XMP_StringPtr data, int len )
-{
-	IgnoreParam(userData);
-
-	#if XMP_DebugBuild & DumpXMLParseEvents		// Avoid unused variable warning.
-		ExpatAdapter * thiz = (ExpatAdapter*)userData;
-	#endif
-
-	if ( (data == 0) || (len == 0) ) { data = ""; len = 0; }
-	
-	#if XMP_DebugBuild & DumpXMLParseEvents
-		if ( thiz->parseLog != 0 ) {
-			PrintIndent ( thiz->parseLog, thiz->nesting );
-			fprintf ( thiz->parseLog, ">>default<<: \"" );
-			for ( ; len > 0; --len, ++data ) fprintf ( thiz->parseLog, "%c", *data );
-			fprintf ( thiz->parseLog, "\"
" );
-		}
-	#endif
-	
-	// *** Ignore for now. Complain if not whitespace?
-	
-}	// DefaultHandler
-
-// =================================================================================================
diff --git a/xmpsdk/src/ParseRDF.cpp b/xmpsdk/src/ParseRDF.cpp
index 575b617..ce12aae 100644
--- a/xmpsdk/src/ParseRDF.cpp
+++ b/xmpsdk/src/ParseRDF.cpp
@@ -317,21 +317,6 @@ IsCoreSyntaxTerm ( RDFTermKind term )
 
 }	// IsCoreSyntaxTerm
 
-// -------------------------------------------------------------------------------------------------
-// IsSyntaxTerm
-// ------------
-//
-// 7.2.3 syntaxTerms
-//		coreSyntaxTerms | rdf:Description | rdf:li
-
-static bool
-IsSyntaxTerm ( RDFTermKind term )
-{
-
-	if 	( (kRDFTerm_FirstSyntax <= term) && (term <= kRDFTerm_LastSyntax) ) return true;
-	return false;
-
-}	// IsSyntaxTerm
 
 // -------------------------------------------------------------------------------------------------
 // IsOldTerm
@@ -350,22 +335,6 @@ IsOldTerm ( RDFTermKind term )
 }	// IsOldTerm
 
 // -------------------------------------------------------------------------------------------------
-// IsNodeElementName
-// -----------------
-//
-// 7.2.5 nodeElementURIs
-//		anyURI - ( coreSyntaxTerms | rdf:li | oldTerms )
-
-static bool
-IsNodeElementName ( RDFTermKind term )
-{
-
-	if 	( (term == kRDFTerm_li) || IsOldTerm ( term ) ) return false;
-	return (! IsCoreSyntaxTerm ( term ));
-
-}	// IsNodeElementName
-
-// -------------------------------------------------------------------------------------------------
 // IsPropertyElementName
 // ---------------------
 //
@@ -381,23 +350,6 @@ IsPropertyElementName ( RDFTermKind term )
 
 }	// IsPropertyElementName
 
-// -------------------------------------------------------------------------------------------------
-// IsPropertyAttributeName
-// -----------------------
-//
-// 7.2.7 propertyAttributeURIs
-//		anyURI - ( coreSyntaxTerms | rdf:Description | rdf:li | oldTerms )
-
-static bool
-IsPropertyAttributeName ( RDFTermKind term )
-{
-
-	if 	( (term == kRDFTerm_Description) || (term == kRDFTerm_li) || IsOldTerm ( term ) ) return false;
-	return (! IsCoreSyntaxTerm ( term ));
-
-}	// IsPropertyAttributeName
-
-
 // =================================================================================================
 // AddChildNode
 // ============
diff --git a/xmpsdk/src/XMPMeta-Parse.cpp b/xmpsdk/src/XMPMeta-Parse.cpp
index 9861286..7c6ae6f 100644
--- a/xmpsdk/src/XMPMeta-Parse.cpp
+++ b/xmpsdk/src/XMPMeta-Parse.cpp
@@ -707,7 +707,7 @@ TouchUpDataModel ( XMPMeta * xmp )
 		// Do a special case fix for dc:subject, make sure it is an unordered array.
 		XMP_Node * dcSubject = FindChildNode ( currSchema, "dc:subject", kXMP_ExistingOnly );
 		if ( dcSubject != 0 ) {
-			XMP_OptionBits keepMask = ~(kXMP_PropArrayIsOrdered | kXMP_PropArrayIsAlternate | kXMP_PropArrayIsAltText);
+                        XMP_OptionBits keepMask = static_cast<XMP_OptionBits>(~(kXMP_PropArrayIsOrdered | kXMP_PropArrayIsAlternate | kXMP_PropArrayIsAltText));
 			dcSubject->options &= keepMask;	// Make sure any ordered array bits are clear.
 		}
 	}
diff --git a/xmpsdk/src/XMPMeta-Serialize.cpp b/xmpsdk/src/XMPMeta-Serialize.cpp
index 73c0d2b..681f186 100644
--- a/xmpsdk/src/XMPMeta-Serialize.cpp
+++ b/xmpsdk/src/XMPMeta-Serialize.cpp
@@ -43,11 +43,6 @@ using namespace std;
 static const char * kPacketHeader  = "<?xpacket begin=\"\xEF\xBB\xBF\" id=\"W5M0MpCehiHzreSzNTczkc9d\"?>";
 static const char * kPacketTrailer = "<?xpacket end=\"w\"?>";	// ! The w/r is at [size-4].
 
-static const char * kPXMP_PacketStart = "<pxmp:XMP_Packet";
-static const char * kPXMP_PacketEnd   = "</pxmp:XMP_Packet>";
-
-static const char * kPXMP_SchemaGroup = "XMP_SchemaGroup";
-
 static const char * kRDF_XMPMetaStart = "<x:xmpmeta xmlns:x=\"adobe:ns:meta/\" x:xmptk=\"";
 static const char * kRDF_XMPMetaEnd   = "</x:xmpmeta>";
 
@@ -61,19 +56,10 @@ static const char * kRDF_StructStart  = "<rdf:Description>";
 static const char * kRDF_StructEnd    = "</rdf:Description>";
 
 static const char * kRDF_BagStart     = "<rdf:Bag>";
-static const char * kRDF_BagEnd       = "</rdf:Bag>";
-
-static const char * kRDF_SeqStart     = "<rdf:Seq>";
-static const char * kRDF_SeqEnd       = "</rdf:Seq>";
-
-static const char * kRDF_AltStart     = "<rdf:Alt>";
-static const char * kRDF_AltEnd       = "</rdf:Alt>";
 
 static const char * kRDF_ItemStart    = "<rdf:li>";
-static const char * kRDF_ItemEnd      = "</rdf:li>";
 
 static const char * kRDF_ValueStart   = "<rdf:value>";
-static const char * kRDF_ValueEnd     = "</rdf:value>";
 
 
 // =================================================================================================
diff --git a/xmpsdk/src/XMPUtils.cpp b/xmpsdk/src/XMPUtils.cpp
index 0dacc0c..1d8c1d8 100644
--- a/xmpsdk/src/XMPUtils.cpp
+++ b/xmpsdk/src/XMPUtils.cpp
@@ -389,21 +389,21 @@ static void FormatFullDateTime ( XMP_DateTime & tempDate, char * buffer, size_t
 
 		// Output YYYY-MM-DDThh:mmTZD.
 		snprintf ( buffer, bufferLen, "%.4d-%02d-%02dT%02d:%02d",	// AUDIT: Callers pass sizeof(buffer).
-				   tempDate.year, tempDate.month, tempDate.day, tempDate.hour, tempDate.minute );
+                           static_cast<int>(tempDate.year), static_cast<int>(tempDate.month), static_cast<int>(tempDate.day), static_cast<int>(tempDate.hour), static_cast<int>(tempDate.minute) );
 
 	} else if ( tempDate.nanoSecond == 0  ) {
 
 		// Output YYYY-MM-DDThh:mm:ssTZD.
 		snprintf ( buffer, bufferLen, "%.4d-%02d-%02dT%02d:%02d:%02d",	// AUDIT: Callers pass sizeof(buffer).
-				   tempDate.year, tempDate.month, tempDate.day,
-				   tempDate.hour, tempDate.minute, tempDate.second );
+                           static_cast<int>(tempDate.year), static_cast<int>(tempDate.month), static_cast<int>(tempDate.day),
+                           static_cast<int>(tempDate.hour), static_cast<int>(tempDate.minute), static_cast<int>(tempDate.second) );
 
 	} else {
 
 		// Output YYYY-MM-DDThh:mm:ss.sTZD.
 		snprintf ( buffer, bufferLen, "%.4d-%02d-%02dT%02d:%02d:%02d.%09d", // AUDIT: Callers pass sizeof(buffer).
-				   tempDate.year, tempDate.month, tempDate.day,
-				   tempDate.hour, tempDate.minute, tempDate.second, tempDate.nanoSecond );
+                           static_cast<int>(tempDate.year), static_cast<int>(tempDate.month), static_cast<int>(tempDate.day),
+                           static_cast<int>(tempDate.hour), static_cast<int>(tempDate.minute), static_cast<int>(tempDate.second), static_cast<int>(tempDate.nanoSecond) );
 		for ( size_t i = strlen(buffer)-1; buffer[i] == '0'; --i ) buffer[i] = 0;	// Trim excess digits.
 
 	}
@@ -600,7 +600,7 @@ static size_t MoveLargestProperty ( XMPMeta & stdXMP, XMPMeta * extXMP, PropSize
 		printf ( "  Move %s, %d bytes
", propName, propSize );
 	#endif
 
-	bool moved = MoveOneProperty ( stdXMP, extXMP, schemaURI, propName ); 
+	bool moved = MoveOneProperty ( stdXMP, extXMP, schemaURI, propName );
 	XMP_Assert ( moved );
 
 	propSizes.erase ( lastPos );
@@ -703,7 +703,7 @@ XMPUtils::ComposeArrayItemPath ( XMP_StringPtr	 schemaNS,
 	
 	if ( itemIndex != kXMP_ArrayLastItem ) {
 		// AUDIT: Using string->capacity() for the snprintf length is safe.
-		snprintf ( const_cast<char*>(sComposedPath->c_str()), sComposedPath->capacity(), "%s[%d]", arrayName, itemIndex );
+            snprintf ( const_cast<char*>(sComposedPath->c_str()), sComposedPath->capacity(), "%s[%d]", arrayName, static_cast<int>(itemIndex) );
 	} else {
 		*sComposedPath = arrayName;
 		*sComposedPath += "[last()] ";
@@ -1063,7 +1063,7 @@ XMPUtils::ConvertFromDate ( const XMP_DateTime & binValue,
 		if ( (tempDate.day == 0) && (tempDate.hour == 0) && (tempDate.minute == 0) &&
 			 (tempDate.second == 0) && (tempDate.nanoSecond == 0) &&
 			 (tempDate.tzSign == 0) && (tempDate.tzHour == 0) && (tempDate.tzMinute == 0) ) {
-			snprintf ( buffer, sizeof(buffer), "%.4d", tempDate.year ); // AUDIT: Using sizeof for snprintf length is safe.
+                    snprintf ( buffer, sizeof(buffer), "%.4d", static_cast<int>(tempDate.year) ); // AUDIT: Using sizeof for snprintf length is safe.
 		} else if ( (tempDate.year == 0) && (tempDate.day == 0) ) {
 			FormatFullDateTime ( tempDate, buffer, sizeof(buffer) );
 			addTimeZone = true;
@@ -1080,7 +1080,7 @@ XMPUtils::ConvertFromDate ( const XMP_DateTime & binValue,
 			 (tempDate.tzSign != 0) || (tempDate.tzHour != 0) || (tempDate.tzMinute != 0) ) {
 			XMP_Throw ( "Invalid partial date, non-zeros after zero month and day", kXMPErr_BadParam);
 		}
-		snprintf ( buffer, sizeof(buffer), "%.4d-%02d", tempDate.year, tempDate.month );	// AUDIT: Using sizeof for snprintf length is safe.
+		snprintf ( buffer, sizeof(buffer), "%.4d-%02d", static_cast<int>(tempDate.year), static_cast<int>(tempDate.month) );	// AUDIT: Using sizeof for snprintf length is safe.
 		
 	} else if ( (tempDate.hour == 0) && (tempDate.minute == 0) &&
 				(tempDate.second == 0) && (tempDate.nanoSecond == 0) &&
@@ -1089,7 +1089,7 @@ XMPUtils::ConvertFromDate ( const XMP_DateTime & binValue,
 		// Output YYYY-MM-DD.
 		if ( (tempDate.month < 1) || (tempDate.month > 12) ) XMP_Throw ( "Month is out of range", kXMPErr_BadParam);
 		if ( (tempDate.day < 1) || (tempDate.day > 31) ) XMP_Throw ( "Day is out of range", kXMPErr_BadParam);
-		snprintf ( buffer, sizeof(buffer), "%.4d-%02d-%02d", tempDate.year, tempDate.month, tempDate.day ); // AUDIT: Using sizeof for snprintf length is safe.
+		snprintf ( buffer, sizeof(buffer), "%.4d-%02d-%02d", static_cast<int>(tempDate.year), static_cast<int>(tempDate.month), static_cast<int>(tempDate.day) ); // AUDIT: Using sizeof for snprintf length is safe.
 
 	} else {
 	
@@ -1113,7 +1113,7 @@ XMPUtils::ConvertFromDate ( const XMP_DateTime & binValue,
 		if ( tempDate.tzSign == 0 ) {
 			*sConvertedValue += 'Z';
 		} else {
-			snprintf ( buffer, sizeof(buffer), "+%02d:%02d", tempDate.tzHour, tempDate.tzMinute );	// AUDIT: Using sizeof for snprintf length is safe.
+                    snprintf ( buffer, sizeof(buffer), "+%02d:%02d", static_cast<int>(tempDate.tzHour), static_cast<int>(tempDate.tzMinute) );	// AUDIT: Using sizeof for snprintf length is safe.
 			if ( tempDate.tzSign < 0 ) buffer[0] = '-';
 			*sConvertedValue += buffer;
 		}

-- 
exiv2 packaging



More information about the pkg-kde-commits mailing list