(In reply to Martin Li������ka from comment #3) > > > > strncpy works as intended here, this is a gcc bug > > https://gcc.gnu.org/bugzilla//show_bug.cgi?id=88059 > > Yes, I must admit the warning has quite some false positivies. In this case, > length is used both for allocation of dest argument (which is strlen of > message + 1). > Thank you for the workaround. s/strncpy/strcpy is a bad workaround, though. Removing -Werror should be enough.