summaryrefslogtreecommitdiff
authorJiamin Ma <jiamin.ma@amlogic.com>2019-01-14 10:56:54 (GMT)
committer xiaoliang.wang <xiaoliang.wang@amlogic.com>2019-01-16 02:57:47 (GMT)
commit7abeb19c88efc2452566a7263ab7be643b5a224f (patch)
treef7e0eeb3fecd790e0feccff7e7b96be6d0c4ad73
parentf3a9e3e51a5229a2c2971538f2eb41e813ddf43c (diff)
downloadcommon-7abeb19c88efc2452566a7263ab7be643b5a224f.zip
common-7abeb19c88efc2452566a7263ab7be643b5a224f.tar.gz
common-7abeb19c88efc2452566a7263ab7be643b5a224f.tar.bz2
build: fix build err [1/1]
PD#SWPL-4150 Problem: When switch to the toolchain shipped with android P, multipile "-Werror=maybe-uninitialized" error occurs, and the code fail to be compiled Solution: Initialize variables if necessary Verify: Locally on Ampere Change-Id: I280de648914565656831e211539bf41a7dee2b4a Signed-off-by: Jiamin Ma <jiamin.ma@amlogic.com>
Diffstat
-rw-r--r--drivers/amlogic/media/common/canvas/canvas_mgr.c2
-rw-r--r--drivers/amlogic/media/dtv_demod/amlfrontend.c4
-rw-r--r--drivers/media/tuners/xc5000.c2
-rw-r--r--kernel/compat.c5
-rw-r--r--kernel/time/posix-cpu-timers.c4
-rw-r--r--kernel/time/time.c5
-rw-r--r--net/unix/af_unix.c4
7 files changed, 23 insertions, 3 deletions
diff --git a/drivers/amlogic/media/common/canvas/canvas_mgr.c b/drivers/amlogic/media/common/canvas/canvas_mgr.c
index 455b512..3bad9b1 100644
--- a/drivers/amlogic/media/common/canvas/canvas_mgr.c
+++ b/drivers/amlogic/media/common/canvas/canvas_mgr.c
@@ -375,7 +375,7 @@ canvas_pool_map_show(struct class *class,
int ret;
int i;
ssize_t size = 0;
- struct canvas_info info;
+ struct canvas_info info = {NULL, 0, NULL, 0};
struct canvas_s canvas;
if (jiffies - pool->last_cat_map > 5 * HZ) {
diff --git a/drivers/amlogic/media/dtv_demod/amlfrontend.c b/drivers/amlogic/media/dtv_demod/amlfrontend.c
index 172f082..0bacdad 100644
--- a/drivers/amlogic/media/dtv_demod/amlfrontend.c
+++ b/drivers/amlogic/media/dtv_demod/amlfrontend.c
@@ -1702,6 +1702,8 @@ static int atsc_j83b_detect_first(struct dvb_frontend *fe, enum fe_status *s)
int cnt;
int check_ok;
+ j83b_status = 0;
+
/*tuner:*/
if (dvb_tuner_delay > 9)
msleep(dvb_tuner_delay);
@@ -1768,7 +1770,7 @@ static int atsc_j83b_polling(struct dvb_frontend *fe, enum fe_status *s)
PR_DBG("+7+");
-
+ j83b_status = 0;
strenth = tuner_get_ch_power(fe);
if (strenth < THRD_TUNER_STRENTH_J83) {
*s = FE_TIMEDOUT;
diff --git a/drivers/media/tuners/xc5000.c b/drivers/media/tuners/xc5000.c
index e6e5e90..2f44e5c 100644
--- a/drivers/media/tuners/xc5000.c
+++ b/drivers/media/tuners/xc5000.c
@@ -931,7 +931,7 @@ static void xc5000_config_tv(struct dvb_frontend *fe,
static int xc5000_set_tv_freq(struct dvb_frontend *fe)
{
struct xc5000_priv *priv = fe->tuner_priv;
- u16 pll_lock_status;
+ u16 pll_lock_status = 0;
int ret;
tune_channel:
diff --git a/kernel/compat.c b/kernel/compat.c
index 333d364..57ccf3c 100644
--- a/kernel/compat.c
+++ b/kernel/compat.c
@@ -112,6 +112,11 @@ COMPAT_SYSCALL_DEFINE2(settimeofday, struct compat_timeval __user *, tv,
struct timespec new_ts;
struct timezone new_tz;
+#ifdef CONFIG_AMLOGIC_MODIFY
+ new_ts.tv_sec = 0;
+ new_ts.tv_nsec = 0;
+#endif
+
if (tv) {
if (compat_get_timeval(&user_tv, tv))
return -EFAULT;
diff --git a/kernel/time/posix-cpu-timers.c b/kernel/time/posix-cpu-timers.c
index 39008d7..d67959c 100644
--- a/kernel/time/posix-cpu-timers.c
+++ b/kernel/time/posix-cpu-timers.c
@@ -1222,6 +1222,10 @@ void set_process_cpu_timer(struct task_struct *tsk, unsigned int clock_idx,
{
unsigned long long now;
+#ifdef CONFIG_AMLOGIC_MODIFY
+ now = 0;
+#endif
+
WARN_ON_ONCE(clock_idx == CPUCLOCK_SCHED);
cpu_timer_sample_group(clock_idx, tsk, &now);
diff --git a/kernel/time/time.c b/kernel/time/time.c
index 3946865..97e0b77 100644
--- a/kernel/time/time.c
+++ b/kernel/time/time.c
@@ -198,6 +198,11 @@ SYSCALL_DEFINE2(settimeofday, struct timeval __user *, tv,
struct timespec new_ts;
struct timezone new_tz;
+#ifdef CONFIG_AMLOGIC_MODIFY
+ new_ts.tv_sec = 0;
+ new_ts.tv_nsec = 0;
+#endif
+
if (tv) {
if (copy_from_user(&user_tv, tv, sizeof(*tv)))
return -EFAULT;
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index 915abe9..3da7824 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -997,6 +997,10 @@ static int unix_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
struct hlist_head *list;
struct path path = { NULL, NULL };
+#ifdef CONFIG_AMLOGIC_MODIFY
+ hash = 0;
+#endif
+
err = -EINVAL;
if (addr_len < offsetofend(struct sockaddr_un, sun_family) ||
sunaddr->sun_family != AF_UNIX)