kls
Vielen Dank für die neue Version.
Ich bekomme damit eine Compiler warning:
CC remux.o
In file included from i18n.h:14,
from config.h:19,
from channels.h:13,
from remux.h:13,
from remux.c:10:
remux.c: In member function 'virtual int cMpeg2Parser::Parse(const uchar*, int, int)':
tools.h:37:64: warning: format not a string literal and no format arguments [-Wformat-security]
37 | #define dsyslog(a...) void( (SysLogLevel > 2) ? syslog_with_tid(LOG_DEBUG, a) : void() )
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
remux.c:1336:16: note: in expansion of macro 'dsyslog'
1336 | dsyslog(s);
| ^~~~~~~
remux.c: In member function 'void cH264Parser::ParseSequenceParameterSet()':
tools.h:37:64: warning: format not a string literal and no format arguments [-Wformat-security]
37 | #define dsyslog(a...) void( (SysLogLevel > 2) ? syslog_with_tid(LOG_DEBUG, a) : void() )
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
remux.c:1610:9: note: in expansion of macro 'dsyslog'
1610 | dsyslog(s);
| ^~~~~~~
remux.c: In member function 'void cH265Parser::ParseSequenceParameterSet()':
tools.h:37:64: warning: format not a string literal and no format arguments [-Wformat-security]
37 | #define dsyslog(a...) void( (SysLogLevel > 2) ? syslog_with_tid(LOG_DEBUG, a) : void() )
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
remux.c:1911:6: note: in expansion of macro 'dsyslog'
1911 | dsyslog(s);
| ^~~~~~~
CC ringbuffer.o
Alles anzeigen
gcc --version
gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Sieht so aus, als ob mein Compiler auf den Format String besteht.
Dies beseitigt die Warning:
diff --git a/remux.c b/remux.c
index 391fd6ff..54fc50fd 100644
--- a/remux.c
+++ b/remux.c
@@ -1333,7 +1333,7 @@ int cMpeg2Parser::Parse(const uchar *Data, int Length, int Pid)
seenScanType = true;
if (debug) {
cString s = cString::sprintf("MPEG2: %d x %d%c %.2f fps", frameWidth, frameHeight, progressive ? 'p' : 'i', framesPerSecond);
- dsyslog(s);
+ dsyslog("%s",*s);
dbgframes("\n%s", *s);
}
}
@@ -1607,7 +1607,7 @@ void cH264Parser::ParseSequenceParameterSet(void)
}
if (debug) {
cString s = cString::sprintf("H.264: %d x %d%c %.2f fps %d Bit", frameWidth, frameHeight, progressive ? 'p':'i', framesPerSecond, bitDepth);
- dsyslog(s);
+ dsyslog("%s", *s);
dbgframes("\n%s", *s);
}
}
@@ -1908,7 +1908,7 @@ void cH265Parser::ParseSequenceParameterSet(void)
}
if (debug) {
cString s = cString::sprintf("H.265: %d x %d%c %.2f fps %d Bit", frameWidth, frameHeight, progressive ? 'p':'i', framesPerSecond, bitDepth);
- dsyslog(s);
+ dsyslog("%s", *s);
dbgframes("\n%s", *s);
}
}
Alles anzeigen