Date: Sat, 27 Jun 2015 08:49:42 +0000 (UTC) From: Takahashi Yoshihiro <nyan@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284885 - head/sys/boot/pc98/boot2 Message-ID: <201506270849.t5R8ng6c024775@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: nyan Date: Sat Jun 27 08:49:41 2015 New Revision: 284885 URL: https://svnweb.freebsd.org/changeset/base/284885 Log: MFi386: r284878 Reduce warnings: - Add prototype for boot2 main() - Don't make assignment within if statement, split it into two. Modified: head/sys/boot/pc98/boot2/boot2.c Modified: head/sys/boot/pc98/boot2/boot2.c ============================================================================== --- head/sys/boot/pc98/boot2/boot2.c Sat Jun 27 05:18:08 2015 (r284884) +++ head/sys/boot/pc98/boot2/boot2.c Sat Jun 27 08:49:41 2015 (r284885) @@ -152,6 +152,7 @@ static int comspeed = SIOSPD; static uint8_t ioctrl = IO_KEYBOARD; #endif +int main(void); void exit(int); static void load(void); static int parse(void); @@ -620,7 +621,8 @@ parse() dsk.daua = dsk.disk | dsk.unit; dsk_meta = 0; } - if (k = ep - arg) { + k = ep - arg; + if (k > 0) { if (k >= sizeof(knamebuf)) return -1; memcpy(knamebuf, arg, k + 1);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201506270849.t5R8ng6c024775>