Browse Source

[Pal/Linux-SGX] Fix warning in db_misc.c

> db_misc.c: In function _DkRandomBitsRead:
> db_misc.c:64:26: warning: this statement may fall through [-Wimplicit-fallthrough=]
>                      rand >>= 16;
>                      ~~~~~^~~~~~
> db_misc.c:65:17: note: here
>                  case 1:
>                  ^~~~

Signed-off-by: Isaku Yamahata <isaku.yamahata@gmail.com>
Isaku Yamahata 6 years ago
parent
commit
87b19376a5
1 changed files with 1 additions and 0 deletions
  1. 1 0
      Pal/src/host/Linux-SGX/db_misc.c

+ 1 - 0
Pal/src/host/Linux-SGX/db_misc.c

@@ -59,6 +59,7 @@ int _DkRandomBitsRead (void * buffer, int size)
                     *(uint16_t *)(buffer + i) = rand & 0xffff;
                     i += 2;
                     rand >>= 16;
+                    /* FALLTHROUGH */
                 case 1:
                     *(uint8_t *)(buffer + i) = rand & 0xff;
                     i++;