mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-28 03:13:11 +08:00
fix[base]: Fix strncpy compile warning
Change-Id: I8c282e20251b2e3e7ea0f67bf0a89bb0dc0fb6a9 Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
This commit is contained in:
@@ -427,7 +427,7 @@ MPP_RET mpp_buffer_create(const char *tag, const char *caller,
|
|||||||
if (NULL == tag)
|
if (NULL == tag)
|
||||||
tag = group->tag;
|
tag = group->tag;
|
||||||
|
|
||||||
strncpy(p->tag, tag, sizeof(p->tag));
|
strncpy(p->tag, tag, sizeof(p->tag) - 1);
|
||||||
p->caller = caller;
|
p->caller = caller;
|
||||||
pthread_mutexattr_t attr;
|
pthread_mutexattr_t attr;
|
||||||
pthread_mutexattr_init(&attr);
|
pthread_mutexattr_init(&attr);
|
||||||
|
|||||||
@@ -189,7 +189,7 @@ MppMetaImpl *MppMetaService::get_meta(const char *tag, const char *caller)
|
|||||||
const char *tag_src = (tag) ? (tag) : (MODULE_TAG);
|
const char *tag_src = (tag) ? (tag) : (MODULE_TAG);
|
||||||
RK_U32 i;
|
RK_U32 i;
|
||||||
|
|
||||||
strncpy(impl->tag, tag_src, sizeof(impl->tag));
|
strncpy(impl->tag, tag_src, sizeof(impl->tag) - 1);
|
||||||
impl->caller = caller;
|
impl->caller = caller;
|
||||||
impl->meta_id = MPP_FETCH_ADD(&meta_id, 1);
|
impl->meta_id = MPP_FETCH_ADD(&meta_id, 1);
|
||||||
INIT_LIST_HEAD(&impl->list_meta);
|
INIT_LIST_HEAD(&impl->list_meta);
|
||||||
|
|||||||
Reference in New Issue
Block a user