On 24/09/2023 12:55, Sakari Ailus wrote: > Hi Hans, > > On Sat, Sep 23, 2023 at 05:20:55PM +0200, Hans Verkuil wrote: >> Increase the size of the name field to prevent a lot of >> string truncate compiler warnings. >> >> Signed-off-by: Hans Verkuil <hverkuil-cisco@xxxxxxxxx> > > I wonder if there's a way to avoid these otherwise. They still 32 > characters when exposed to the user space. Besides --- will the strings > exported to the user space remain "\0"-terminated? Yes, those are always 0 terminated. We are always using either snprintf or strscpy to write to the 'name' arrays. Regards, Hans > >> --- >> include/media/v4l2-dev.h | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h >> index e0a13505f88d..d82dfdbf6e58 100644 >> --- a/include/media/v4l2-dev.h >> +++ b/include/media/v4l2-dev.h >> @@ -284,7 +284,7 @@ struct video_device { >> struct v4l2_prio_state *prio; >> >> /* device info */ >> - char name[32]; >> + char name[64]; >> enum vfl_devnode_type vfl_type; >> enum vfl_devnode_direction vfl_dir; >> int minor; >