From: Markham Date: Sat, 11 Jun 2022 20:00:39 +0000 (+0200) Subject: add djmount-fix-compiler-warnings.patch X-Git-Url: https://git.webhop.me/?a=commitdiff_plain;h=5eb54b2f0a7a5940c3e8fac7ef3c9ddbbb9b5e88;p=bs-cst-neutrino-hd.git add djmount-fix-compiler-warnings.patch --- diff --git a/archive-patches/djmount/0015-djmount-fix-compiler-warnings.patch b/archive-patches/djmount/0015-djmount-fix-compiler-warnings.patch new file mode 100644 index 0000000..4eba50a --- /dev/null +++ b/archive-patches/djmount/0015-djmount-fix-compiler-warnings.patch @@ -0,0 +1,80 @@ +--- a/djmount/didl_object.c ++++ b/djmount/didl_object.c +@@ -114,7 +114,8 @@ DIDLObject_Create (void* talloc_context, + if (o->cds_class == NULL) + o->cds_class = ""; + +- char* s = ixmlElement_getAttribute (o->element, "searchable"); ++ const char* s = ixmlElement_getAttribute (o->element, ++ "searchable"); + o->searchable = String_ToBoolean (s, false); + + Log_Printf (LOG_DEBUG, +--- a/djmount/xml_util.c ++++ b/djmount/xml_util.c +@@ -43,7 +43,7 @@ + const char* + XMLUtil_GetElementValue (IN const IXML_Element* element) + { +- char* res = NULL; ++ const char* res = NULL; + IXML_Node* child = ixmlNode_getFirstChild + (discard_const_p (IXML_Node, XML_E2N (element))); + while (child && !res) { +@@ -133,7 +133,7 @@ + * XMLUtil_GetDocumentString + *****************************************************************************/ + char* +-XMLUtil_GetDocumentString (void* context, const IXML_Document* doc) ++XMLUtil_GetDocumentString (void* context, IXML_Document* doc) + { + // TBD XXX + // TBD prepend if not already done ??? +--- a/djmount/xml_util.h ++++ b/djmount/xml_util.h +@@ -138,7 +138,7 @@ + * The returned string should be freed using "talloc_free". + *****************************************************************************/ + char* +-XMLUtil_GetDocumentString (void* talloc_context, IN const IXML_Document* doc); ++XMLUtil_GetDocumentString (void* talloc_context, IN IXML_Document* doc); + + + /***************************************************************************** +--- a/djmount/upnp_util.c ++++ b/djmount/upnp_util.c +@@ -28,6 +28,7 @@ + # include + #endif + ++#include + #include "upnp_util.h" + #include "log.h" + #include "xml_util.h" +--- a/djmount/device_list.c ++++ b/djmount/device_list.c +@@ -938,6 +958,7 @@ + isleep (CHECK_SUBSCRIPTIONS_TIMEOUT); + VerifyTimeouts (CHECK_SUBSCRIPTIONS_TIMEOUT); + } ++ return NULL; + } + + +--- a/djmount/test_upnp.c ++++ b/djmount/test_upnp.c +@@ -480,11 +480,13 @@ + char cmdline[100]; + printf ("\n>> " ); + fflush (stdout); +- fgets (cmdline, sizeof (cmdline), stdin); ++ if (fgets (cmdline, sizeof (cmdline), stdin) == NULL) ++ break; + if (*cmdline) + process_command (cmdline); + } + #endif ++ return NULL; + } + + diff --git a/make/applications.mk b/make/applications.mk index 452ec4f..bd4b6cb 100755 --- a/make/applications.mk +++ b/make/applications.mk @@ -681,6 +681,7 @@ DJMOUNT_PATCH += 0011-djmount-libupnp-1.6.6.patch DJMOUNT_PATCH += 0012-djmount-libupnp-1.6.13.patch DJMOUNT_PATCH += 0013-djmount-avoid-crash-by-using-size_t.patch DJMOUNT_PATCH += 0014-djmount-enable-bigfiles.patch +DJMOUNT_PATCH += 0015-djmount-fix-compiler-warnings.patch DJMOUNT_PATCH += djmount-codeset.patch DJMOUNT_PATCH += djmount-upnp_util.h-fix-build.patch