Am 21.12.2011 23:31, schrieb Klaus Schmidinger:
On 21.12.2011 23:18, Lars Hanisch wrote:

The compiler gives me:

:~/src/vdr$ make config.o
g++ -g -O3 -Wall -Woverloaded-virtual -Wno-parentheses -c 
-DVIDEODIR=\"/video\" -DCONFDIR=\"/video\" -DPLUGINDIR=\"./PLUGINS/lib\"
-DLOCDIR=\"./locale\" -I/usr/include/freetype2 config.c
In file included from /usr/include/string.h:642:0,
from config.h:16,
from config.c:10:
In Funktion »void* memset(void*, int, size_t)«,
eingefügt von »cSatCableNumbers::cSatCableNumbers(int, const char*)« bei 
/usr/include/x86_64-linux-gnu/bits/string3.h:82:32: Warnung: Aufruf von 
»__warn_memset_zero_len« mit Attributwarnung
deklariert: memset used with constant zero length parameter; this could be due 
to transposed parameters [standardmäßig

I think, the memset arguments should be swapped:

diff --git a/config.c b/config.c
index 94f6845..53beb4b 100644
--- a/config.c
+++ b/config.c
@@ -69,7 +69,7 @@ cSatCableNumbers::cSatCableNumbers(int Size, const char *s)
size = Size;
array = MALLOC(int, size);
- memset(array, size * sizeof(int), 0);
+ memset(array, 0, size * sizeof(int));

Ville Skyttä already reported this to me and I have removed that call
altogether for the next developer version, because the array is initialized
explicitly, anyway.

 Fine! :-)



vdr mailing list

vdr mailing list

Reply via email to