Fix a few gcc 8 / scan-build compiler warnings
This commit is contained in:
parent
cf927e7daa
commit
56d3f42598
|
@ -322,7 +322,8 @@ pict_tmpfile_recreate(struct pipe_metadata *pm, const char *ext)
|
||||||
pict_tmpfile_close(pm);
|
pict_tmpfile_close(pm);
|
||||||
|
|
||||||
strcpy(pm->pict_tmpfile_path, PIPE_TMPFILE_TEMPLATE);
|
strcpy(pm->pict_tmpfile_path, PIPE_TMPFILE_TEMPLATE);
|
||||||
strncpy(pm->pict_tmpfile_path + offset, ext, PIPE_TMPFILE_TEMPLATE_EXTLEN);
|
// Use memcpy instead of strncpy because gcc 8 gives false warnings otherwise
|
||||||
|
memcpy(pm->pict_tmpfile_path + offset, ext, PIPE_TMPFILE_TEMPLATE_EXTLEN);
|
||||||
|
|
||||||
pm->pict_tmpfile_fd = mkstemps(pm->pict_tmpfile_path, PIPE_TMPFILE_TEMPLATE_EXTLEN);
|
pm->pict_tmpfile_fd = mkstemps(pm->pict_tmpfile_path, PIPE_TMPFILE_TEMPLATE_EXTLEN);
|
||||||
|
|
||||||
|
|
|
@ -391,6 +391,7 @@ mfi_id_find(const char *path)
|
||||||
{
|
{
|
||||||
if (qp.results == 1)
|
if (qp.results == 1)
|
||||||
{
|
{
|
||||||
|
free(winner); // This is just here to keep scan-build happy
|
||||||
winner = strdup(dbpath);
|
winner = strdup(dbpath);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -159,6 +159,7 @@ process_regular_file(int pl_id, char *path)
|
||||||
{
|
{
|
||||||
if (qp.results == 1)
|
if (qp.results == 1)
|
||||||
{
|
{
|
||||||
|
free(winner); // This is just here to keep scan-build happy
|
||||||
winner = strdup(dbpath);
|
winner = strdup(dbpath);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue