Skip to content
  • Chen Qun's avatar
    81966c18
    linux-user/mips/cpu_loop: silence the compiler warnings · 81966c18
    Chen Qun authored
    
    
    When using -Wimplicit-fallthrough in our CFLAGS, the compiler showed warning:
    linux-user/mips/cpu_loop.c: In function ‘cpu_loop’:
    linux-user/mips/cpu_loop.c:104:24: warning: this statement may fall through [-Wimplicit-fallthrough=]
      104 |                     if ((ret = get_user_ual(arg8, sp_reg + 28)) != 0) {
          |                        ^
    linux-user/mips/cpu_loop.c:107:17: note: here
      107 |                 case 7:
          |                 ^~~~
    linux-user/mips/cpu_loop.c:108:24: warning: this statement may fall through [-Wimplicit-fallthrough=]
      108 |                     if ((ret = get_user_ual(arg7, sp_reg + 24)) != 0) {
          |                        ^
    linux-user/mips/cpu_loop.c:111:17: note: here
      111 |                 case 6:
          |                 ^~~~
    linux-user/mips/cpu_loop.c:112:24: warning: this statement may fall through [-Wimplicit-fallthrough=]
      112 |                     if ((ret = get_user_ual(arg6, sp_reg + 20)) != 0) {
          |                        ^
    linux-user/mips/cpu_loop.c:115:17: note: here
      115 |                 case 5:
          |                 ^~~~
    
    Add the corresponding "fall through" comment to fix it.
    
    Reported-by: default avatarEuler Robot <euler.robot@huawei.com>
    Signed-off-by: default avatarChen Qun <kuhn.chenqun@huawei.com>
    Reviewed-by: default avatarThomas Huth <thuth@redhat.com>
    Reviewed-by: default avatarLaurent Vivier <laurent@vivier.eu>
    Message-Id: <20201030004046.2191790-5-kuhn.chenqun@huawei.com>
    Signed-off-by: default avatarLaurent Vivier <laurent@vivier.eu>
    81966c18
    linux-user/mips/cpu_loop: silence the compiler warnings
    Chen Qun authored
    
    
    When using -Wimplicit-fallthrough in our CFLAGS, the compiler showed warning:
    linux-user/mips/cpu_loop.c: In function ‘cpu_loop’:
    linux-user/mips/cpu_loop.c:104:24: warning: this statement may fall through [-Wimplicit-fallthrough=]
      104 |                     if ((ret = get_user_ual(arg8, sp_reg + 28)) != 0) {
          |                        ^
    linux-user/mips/cpu_loop.c:107:17: note: here
      107 |                 case 7:
          |                 ^~~~
    linux-user/mips/cpu_loop.c:108:24: warning: this statement may fall through [-Wimplicit-fallthrough=]
      108 |                     if ((ret = get_user_ual(arg7, sp_reg + 24)) != 0) {
          |                        ^
    linux-user/mips/cpu_loop.c:111:17: note: here
      111 |                 case 6:
          |                 ^~~~
    linux-user/mips/cpu_loop.c:112:24: warning: this statement may fall through [-Wimplicit-fallthrough=]
      112 |                     if ((ret = get_user_ual(arg6, sp_reg + 20)) != 0) {
          |                        ^
    linux-user/mips/cpu_loop.c:115:17: note: here
      115 |                 case 5:
          |                 ^~~~
    
    Add the corresponding "fall through" comment to fix it.
    
    Reported-by: default avatarEuler Robot <euler.robot@huawei.com>
    Signed-off-by: default avatarChen Qun <kuhn.chenqun@huawei.com>
    Reviewed-by: default avatarThomas Huth <thuth@redhat.com>
    Reviewed-by: default avatarLaurent Vivier <laurent@vivier.eu>
    Message-Id: <20201030004046.2191790-5-kuhn.chenqun@huawei.com>
    Signed-off-by: default avatarLaurent Vivier <laurent@vivier.eu>
Loading