Giter Site home page Giter Site logo

Comments (4)

madmartin avatar madmartin commented on June 16, 2024 1

Another warning:

In file included from displaybase.c:17:
displaybase.c: In member function ‘void cDisplay::DrawText(int, int, const char*, int, enumTeletextColor)’:
logging.h:42:44: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 9 has type ‘size_t’ {aka ‘unsigned int’} [-Wformat=]
 #define dsyslog_ot(format, arg...) dsyslog("osdteletext: DEBUG %s/%s: " format, __FILE__, __FUNCTION__, ## arg)
logging.h:60:65: note: in expansion of macro ‘dsyslog_ot’
 #define DEBUG_OT_DTXT   if (m_debugmask & DEBUG_MASK_OT_DTXT )  dsyslog_ot
                                                                 ^~~~~~~~~~
displaybase.c:678:5: note: in expansion of macro ‘DEBUG_OT_DTXT’
     DEBUG_OT_DTXT("called with x=%d y=%d len=%d text='%s' strlen(text)=%ld", x, y, len, text, strlen(text));
     ^~~~~~~~~~~~~

This patch fixes it:

--- vdr-plugin-osdteletext-2.0.0.orig/displaybase.c
+++ vdr-plugin-osdteletext-2.0.0/displaybase.c
@@ -675,7 +675,7 @@ void cDisplay::DrawTextExtended(const in
 
 void cDisplay::DrawText(int x, int y, const char *text, int len, const enumTeletextColor cText) {
     // Copy text to teletext page
-    DEBUG_OT_DTXT("called with x=%d y=%d len=%d text='%s' strlen(text)=%ld", x, y, len, text, strlen(text));
+    DEBUG_OT_DTXT("called with x=%d y=%d len=%d text='%s' strlen(text)=%d", x, y, len, text, strlen(text));
 
     cTeletextChar c;
     c.SetFGColor(cText); // default ttcWhite

from vdr-plugin-osdteletext.

pbiering avatar pbiering commented on June 16, 2024

Preview: https://github.com/pbiering/vdr-plugin-osdteletext/tree/2.0.1-regression, please test

from vdr-plugin-osdteletext.

madmartin avatar madmartin commented on June 16, 2024

Hi,
well done, plugin works and no more warnings from both gcc and clang.
From my side the bunch of clang settings in Makefile is not necessary.
Closing.

from vdr-plugin-osdteletext.

pbiering avatar pbiering commented on June 16, 2024

From my side the bunch of clang settings in Makefile is not necessary.

I need them here for testing compilation with clang on a "default" gcc system

from vdr-plugin-osdteletext.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.