tags 871094 + patch
thanks
The attached patch fixes the implicit fallthrough warnings and an
uninitialized variable.
--- a/src/bloc.c
+++ b/src/bloc.c
@@ -1249,6 +1249,7 @@
case MEM_SET_SIZE:
u32 = args;
bd->trks = (*u32 + bd->seclen - 1) / bd->seclen + 1;
+ __attribute__((fallthrough));
default:
ret = -1;
break;
--- a/src/char.c
+++ b/src/char.c
@@ -154,6 +154,7 @@
CHARDEV_DPRINTF("one serial port\n");
register_outd = 1;
/* No break here */
+ __attribute__((fallthrough));
case CHARDEV_KBD:
CHARDEV_DPRINTF("one input port %d %d\n", n, i);
if (i < 16 && chardev_open(cur) == 0) {
@@ -162,6 +163,7 @@
if (!register_outd)
break;
/* No break here */
+ __attribute__((fallthrough));
case CHARDEV_DISPLAY:
CHARDEV_DPRINTF("one output port %d %d\n", n, j);
if (j < 16 && chardev_open(cur) == 0) {
@@ -587,6 +589,7 @@
case ADB_LISTEN:
memcpy(adb_send + 1, buf, len);
/* No break here */
+ __attribute__((fallthrough));
case ADB_TALK:
adb_send[0] = (dev->addr << 4) | cmd | reg;
break;
--- a/src/libc/src/format.c
+++ b/src/libc/src/format.c
@@ -281,6 +281,7 @@
goto next;
}
/* No break here */
+ __attribute__((fallthrough));
case '1' ... '9':
switch (maxfill) {
case -2:
@@ -350,6 +351,7 @@
goto invalid;
} else {
tmp = outc(outf, private, '%', maxlen - totlen);
+ __attribute__((fallthrough));
}
default:
invalid:
--- a/src/of.c
+++ b/src/of.c
@@ -3000,7 +3000,7 @@
{
OF_env_t *OF_env = OF_env_main;
OF_node_t *pci_ata = dev;
- OF_node_t *ata, *atas[2];
+ OF_node_t *ata, *atas[2] = { NULL };
int i;
OF_prop_int_new(OF_env, pci_ata, "#address-cells", 1);