[Libva] Libva 1.0.3 BRP checks
Dominique Leuenberger
dominique at leuenberger.net
Tue Jul 20 13:28:30 PDT 2010
Dear All,
I've been building libva 1.0.3 and the final build root policy check
ranted about the following errors:
I: A function uses a 'return;' statement, but has actually a value
to return, like an integer ('return 42;') or similar.
W: libva voidreturn h264encode.c:147, 191
W: libva voidreturn va_trace.c:1082
I: Program returns random data in a function
E: libva no-return-in-nonvoid-function va_trace.c:1035, 739, 161, 131,
110, 87, 74, 59
I: Program returns random data in a function
E: libva no-return-in-nonvoid-function va_trace.c:1035, 739, 161, 131,
110, 87, 74, 59
The information is rather clear and most of them are normally trivial to
fix, if you know the API of the lib.
Like for example:
int va_TraceInit(void)
{
trace_file = (const char *)getenv("LIBVA_TRACE");
if (trace_file) {
trace_fp = fopen(trace_file, "w");
if (trace_fp)
trace_flag = 1;
}
}
What would one expect the lib to return here? I'd assume 0 as success and 1 as failure? Or maybe even the file-pointer, returned if it worked?
Not having any comments in the code does not make it much easier to figure out what the 'right' fix would be though.
I'm looking forward in working together with you in resorting those and will gladly keep building the lib and keep on reporting such, normally obvious, BRP reports.
Best regards,
Dominique
More information about the Libva
mailing list