Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prim_ops: fix some indentation #44

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lkundrak
Copy link

@lkundrak lkundrak commented Nov 1, 2024

It upsets gcc's -Wmisleading-indentation:

  prim_ops.c: In function ‘sbb_word’:
  prim_ops.c:1780:5: warning: this ‘else’ clause does not guard... [-Wmisleading-indentation]
   1780 |     else
        |     ^~~~
  In file included from prim_ops.c:99:
  include/x86emu_int.h:76:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘else’
     76 |   if(COND) SET_FLAG(FLAG); else CLEAR_FLAG(FLAG)
        |   ^~
  prim_ops.c:1782:9: note: in expansion of macro ‘CONDITIONAL_SET_FLAG’
   1782 |         CONDITIONAL_SET_FLAG(res & 0x8000, F_SF);
        |         ^~~~~~~~~~~~~~~~~~~~
  prim_ops.c: In function ‘sbb_long’:
  prim_ops.c:1805:5: warning: this ‘else’ clause does not guard... [-Wmisleading-indentation]
   1805 |     else
        |     ^~~~
  include/x86emu_int.h:76:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘else’
     76 |   if(COND) SET_FLAG(FLAG); else CLEAR_FLAG(FLAG)
        |   ^~
  prim_ops.c:1807:9: note: in expansion of macro ‘CONDITIONAL_SET_FLAG’
   1807 |         CONDITIONAL_SET_FLAG(res & 0x80000000, F_SF);
        |         ^~~~~~~~~~~~~~~~~~~~

It upsets gcc's -Wmisleading-indentation:

  prim_ops.c: In function ‘sbb_word’:
  prim_ops.c:1780:5: warning: this ‘else’ clause does not guard... [-Wmisleading-indentation]
   1780 |     else
        |     ^~~~
  In file included from prim_ops.c:99:
  include/x86emu_int.h:76:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘else’
     76 |   if(COND) SET_FLAG(FLAG); else CLEAR_FLAG(FLAG)
        |   ^~
  prim_ops.c:1782:9: note: in expansion of macro ‘CONDITIONAL_SET_FLAG’
   1782 |         CONDITIONAL_SET_FLAG(res & 0x8000, F_SF);
        |         ^~~~~~~~~~~~~~~~~~~~
  prim_ops.c: In function ‘sbb_long’:
  prim_ops.c:1805:5: warning: this ‘else’ clause does not guard... [-Wmisleading-indentation]
   1805 |     else
        |     ^~~~
  include/x86emu_int.h:76:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘else’
     76 |   if(COND) SET_FLAG(FLAG); else CLEAR_FLAG(FLAG)
        |   ^~
  prim_ops.c:1807:9: note: in expansion of macro ‘CONDITIONAL_SET_FLAG’
   1807 |         CONDITIONAL_SET_FLAG(res & 0x80000000, F_SF);
        |         ^~~~~~~~~~~~~~~~~~~~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant