> build_record( records [i], i, lines[i], sep );
Is this even compiling for you?
Because it seems to me you're passing a record by value, yet the function in question expects a pointer. If you did pass a pointer (like the function expects), then there would be no need to also return it as well.
Additionally, the build_record() function is returning a result which you're just ignoring.
> Maybe i'm wrong, but I've meet several times such problems
Well if you ignore as many warnings as you seem to, then I'm not surprised at all.