[evince] backend-pdf: add format attribute to stop warning on string literal



commit 4ec97a9f66a5e47d058b5711958593b99f251430
Author: vanadiae <vanadiae35 gmail com>
Date:   Wed Jun 10 17:23:45 2020 +0200

    backend-pdf: add format attribute to stop warning on string literal
    
    Because every printf-like function requires the fmt parameters to be
    a string literal.

 backend/pdf/ev-poppler.cc | 1 +
 1 file changed, 1 insertion(+)
---
diff --git a/backend/pdf/ev-poppler.cc b/backend/pdf/ev-poppler.cc
index 50a87342..4b0f7b60 100644
--- a/backend/pdf/ev-poppler.cc
+++ b/backend/pdf/ev-poppler.cc
@@ -773,6 +773,7 @@ pdf_document_get_keywords_from_metadata (xmlXPathContextPtr xpathCtx)
        return result;
 }
 
+__attribute__((__format__ (__printf__, 2, 0)))
 static char *
 pdf_document_get_localized_object_from_metadata (xmlXPathContextPtr xpathCtx,
                                                  const char* xpath)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]