Opened 3 years ago

Closed 2 years ago

#12762 closed bug (fixed)

[Patch] apps/serialconnect/encoding.c: fix gcc6 build

Reported by: mt Owned by: pulkomandy
Priority: normal Milestone: Unscheduled
Component: Applications Version: R1/Development
Keywords: apps/serialconnect Cc:
Blocked By: Blocking:
Has a Patch: yes Platform: All

Description

Reindent source code, to fix gcc6 '-Werror=misleading-indentation' warnings.

Cc /home/haiku/haiku/haiku/generated-gcc6/objects/haiku/x86/release/apps/serialconnect/encoding.o 
/home/haiku/haiku/haiku/src/apps/serialconnect/libvterm/src/encoding.c: In function 'decode_utf8':
/home/haiku/haiku/haiku/src/apps/serialconnect/libvterm/src/encoding.c:77:11: error: this 'if' clause does not guard... [-Werror=misleading-indentation]
           if(data->this_cp <  0x0080) data->this_cp = UNICODE_INVALID; break;
           ^~
/home/haiku/haiku/haiku/src/apps/serialconnect/libvterm/src/encoding.c:77:72: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
           if(data->this_cp <  0x0080) data->this_cp = UNICODE_INVALID; break;
                                                                        ^~~~~
/home/haiku/haiku/haiku/src/apps/serialconnect/libvterm/src/encoding.c:79:11: error: this 'if' clause does not guard... [-Werror=misleading-indentation]
           if(data->this_cp <  0x0800) data->this_cp = UNICODE_INVALID; break;
           ^~
/home/haiku/haiku/haiku/src/apps/serialconnect/libvterm/src/encoding.c:79:72: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
           if(data->this_cp <  0x0800) data->this_cp = UNICODE_INVALID; break;
                                                                        ^~~~~
/home/haiku/haiku/haiku/src/apps/serialconnect/libvterm/src/encoding.c:81:11: error: this 'if' clause does not guard... [-Werror=misleading-indentation]
           if(data->this_cp < 0x10000) data->this_cp = UNICODE_INVALID; break;
           ^~
/home/haiku/haiku/haiku/src/apps/serialconnect/libvterm/src/encoding.c:81:72: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
           if(data->this_cp < 0x10000) data->this_cp = UNICODE_INVALID; break;
                                                                        ^~~~~
/home/haiku/haiku/haiku/src/apps/serialconnect/libvterm/src/encoding.c:83:11: error: this 'if' clause does not guard... [-Werror=misleading-indentation]
           if(data->this_cp < 0x200000) data->this_cp = UNICODE_INVALID; break;
           ^~
/home/haiku/haiku/haiku/src/apps/serialconnect/libvterm/src/encoding.c:83:73: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
           if(data->this_cp < 0x200000) data->this_cp = UNICODE_INVALID; break;
                                                                         ^~~~~
/home/haiku/haiku/haiku/src/apps/serialconnect/libvterm/src/encoding.c:85:11: error: this 'if' clause does not guard... [-Werror=misleading-indentation]
           if(data->this_cp < 0x4000000) data->this_cp = UNICODE_INVALID; break;
           ^~
/home/haiku/haiku/haiku/src/apps/serialconnect/libvterm/src/encoding.c:85:74: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
           if(data->this_cp < 0x4000000) data->this_cp = UNICODE_INVALID; break;
                                                                          ^~~~~
cc1: all warnings being treated as errors

Attachments (1)

0014-encoding.c-fix-gcc6-build.patch (1.8 KB ) - added by mt 3 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 by mt, 3 years ago

Has a Patch: set

comment:2 by korli, 3 years ago

Owner: changed from nobody to pulkomandy
Status: newassigned

comment:3 by pulkomandy, 3 years ago

Looks correct, but maybe we should see if upstream libvterm has the changes already. And maybe we should make libvterm an external package?

comment:4 by pulkomandy, 2 years ago

Resolution: fixed
Status: assignedclosed

Fixed in c95da8e7006d90 by applying upstream changes.

Note: See TracTickets for help on using tickets.