Re: [PATCH] m32r: fix build warning about putc

From: kbuild test robot
Date: Sun Jun 26 2016 - 23:49:54 EST


Hi,

[auto build test WARNING on v4.7-rc5]
[also build test WARNING on next-20160624]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Sudip-Mukherjee/m32r-fix-build-warning-about-putc/20160627-094312
config: m32r-m32104ut_defconfig (attached as .config)
compiler: m32r-linux-gcc (GCC) 4.9.0
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=m32r

All warnings (new ones prefixed by >>):

In file included from arch/m32r/boot/compressed/misc.c:25:0:
arch/m32r/boot/compressed/m32r_sio.c: In function 'puts':
>> arch/m32r/boot/compressed/m32r_sio.c:16:2: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
while (c = *s++)
^

vim +16 arch/m32r/boot/compressed/m32r_sio.c

1 /*
2 * arch/m32r/boot/compressed/m32r_sio.c
3 *
4 * 2003-02-12: Takeo Takahashi
5 * 2006-11-30: OPSPUT support by Kazuhiro Inaoka
6 *
7 */
8
9 #include <asm/processor.h>
10
11 static void m32r_putc(char c);
12
13 static int puts(const char *s)
14 {
15 char c;
> 16 while (c = *s++)
17 m32r_putc(c);
18 return 0;
19 }
20
21 #if defined(CONFIG_PLAT_M32700UT) || defined(CONFIG_PLAT_OPSPUT)
22 #include <asm/m32r.h>
23 #include <asm/io.h>
24

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: Binary data