Change-Id: I5821dc8a44f724e59cee65e356dfae4fbae04f76 Signed-off-by: LiFeng <lifeng68@huawei.com>
85 lines
2.4 KiB
Diff
85 lines
2.4 KiB
Diff
From abcb5c5bdd46cb83deff2d2af95c26221ef51a8e Mon Sep 17 00:00:00 2001
|
|
From: LiFeng <lifeng68@huawei.com>
|
|
Date: Mon, 3 Jun 2019 06:19:07 -0400
|
|
Subject: [PATCH 102/138] lxc: fix compile warnings
|
|
|
|
Signed-off-by: LiFeng <lifeng68@huawei.com>
|
|
---
|
|
src/lxc/conf.c | 1 -
|
|
src/lxc/path.c | 5 -----
|
|
src/lxc/utils.c | 2 +-
|
|
3 files changed, 1 insertion(+), 7 deletions(-)
|
|
|
|
diff --git a/src/lxc/conf.c b/src/lxc/conf.c
|
|
index ec1667d..e7df336 100644
|
|
--- a/src/lxc/conf.c
|
|
+++ b/src/lxc/conf.c
|
|
@@ -4992,7 +4992,6 @@ int run_lxc_hooks(const char *name, char *hookname, struct lxc_conf *conf,
|
|
|
|
int run_oci_hooks(const char *name, char *hookname, struct lxc_conf *conf, const char *lxcpath)
|
|
{
|
|
- struct lxc_list *it;
|
|
int which = -1;
|
|
|
|
if (strcmp(hookname, "oci-prestart") == 0) {
|
|
diff --git a/src/lxc/path.c b/src/lxc/path.c
|
|
index 45ab4c3..92692de 100644
|
|
--- a/src/lxc/path.c
|
|
+++ b/src/lxc/path.c
|
|
@@ -141,7 +141,6 @@ int do_clean_path(const char *respath, const char *limit_respath,
|
|
{
|
|
char *dest = *dst;
|
|
const char *endpos = NULL;
|
|
- errno_t ret;
|
|
|
|
for (endpos = stpos; *stpos; stpos = endpos) {
|
|
while (ISSLASH(*stpos)) {
|
|
@@ -184,7 +183,6 @@ char *cleanpath(const char *path, char *realpath, size_t realpath_len)
|
|
char *dest = NULL;
|
|
const char *stpos = NULL;
|
|
const char *limit_respath = NULL;
|
|
- errno_t ret;
|
|
|
|
if (path == NULL || path[0] == '\0' || \
|
|
realpath == NULL || (realpath_len < PATH_MAX)) {
|
|
@@ -293,7 +291,6 @@ static int do_get_symlinks(const char **fullpath, const char *prefix, size_t pre
|
|
{
|
|
char *buf = NULL;
|
|
size_t len;
|
|
- errno_t rc = EOK;
|
|
ssize_t n;
|
|
int ret = -1;
|
|
|
|
@@ -398,7 +395,6 @@ static int do_eval_symlinks_in_scope(const char *fullpath, const char *prefix,
|
|
const char *start = NULL;
|
|
const char *end = NULL;
|
|
char *extra_buf = NULL;
|
|
- errno_t rc = EOK;
|
|
int nret = 0;
|
|
int num_links = 0;
|
|
|
|
@@ -450,7 +446,6 @@ static char *eval_symlinks_in_scope(const char *fullpath, const char *rootpath)
|
|
char *prefix = NULL;
|
|
const char *rpath_limit = NULL;
|
|
size_t prefix_len;
|
|
- errno_t rc = EOK;
|
|
|
|
if (fullpath == NULL || rootpath == NULL) {
|
|
return NULL;
|
|
diff --git a/src/lxc/utils.c b/src/lxc/utils.c
|
|
index 9ce2473..e674947 100644
|
|
--- a/src/lxc/utils.c
|
|
+++ b/src/lxc/utils.c
|
|
@@ -2106,7 +2106,7 @@ void *lxc_common_calloc_s(size_t size)
|
|
int lxc_mem_realloc(void **newptr, size_t newsize, void *oldptr, size_t oldsize)
|
|
{
|
|
void *tmp = NULL;
|
|
- int nret = 0;
|
|
+
|
|
if (newsize == 0) {
|
|
goto err_out;
|
|
}
|
|
--
|
|
1.8.3.1
|
|
|