1. 26 1月, 2015 2 次提交
  2. 20 1月, 2015 1 次提交
    • P
      scripts/qapi-types.py: Add dummy member to empty structs · 83ecb22b
      Peter Maydell 提交于
      Make sure that all generated C structs have at least one field; this
      avoids potential issues with attempting to malloc space for
      zero-length structs in C (g_malloc(sizeof struct) would return NULL).
      It also avoids an incompatibility with C++ (where an empty struct is
      size 1); that isn't important to us now but might be in future.
      
      Generated empty structures look like this:
          struct Abort
          {
              char qapi_dummy_field_for_empty_struct;
          };
      
      This silences clang warnings like:
      ./qapi-types.h:3752:1: warning: empty struct has size 0 in C, size 1 in C++ [-Wextern-c-compat]
      struct Abort
      ^
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Message-id: 1419359069-16611-1-git-send-email-peter.maydell@linaro.org
      83ecb22b
  3. 13 1月, 2015 1 次提交
    • M
      checkpatch: Brace handling on multi-line condition · a97ceca5
      Max Reitz 提交于
      CODING_STYLE states the following about braces around blocks:
      
      > The opening brace is on the line that contains the control flow
      > statement that introduces the new block; [...]
      
      This is obviously impossible with multi-line conditions. Therefore,
      CODING_STYLE does not make any clear statement about where to put the
      opening brace after a multi-line condition.
      
      There is a reason to prefer to place the opening brace on an own line
      after such a condition while still placing it on the same line as the
      "control flow statement" if possible; that reason is that the last line
      of a multi-line condition is indented, in the case of "if", it is often
      indented by four spaces, just as much as the first statement in the
      block will be indented. This is hard to read as there is no clearly
      visible distinction between condition and block. Placing the opening
      brace on a separate line solves this issue.
      
      Also, there are cases where placing the opening brace on a separate line
      is the only viable option; if the previous line had nearly 80 characters
      and splitting it is not desirable, the opening brace is naturally placed
      on an own line.
      
      This patch fixes checkpatch.pl to not complain about braces on own lines
      if the condition introducing the block spanned more than one line, or if
      the previous line had 79 or 80 characters.
      
      Furthermore, the warning about not having braces around a block is fixed
      to mind braces not being on the last line of the condition.
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      a97ceca5
  4. 10 12月, 2014 1 次提交
  5. 18 11月, 2014 1 次提交
  6. 02 11月, 2014 1 次提交
  7. 31 10月, 2014 5 次提交
  8. 23 10月, 2014 2 次提交
    • P
      get_maintainer.pl: restrict cases where it falls back to --git · c6561586
      Paolo Bonzini 提交于
      The list emitted by --git-fallback often leads inexperienced contributors
      to add pointless CCs.  While not discouraging usage of --git-fallback,
      we want to:
      
      1) disable the fallback if only some files lack a maintainer
      
          $ scripts/get_maintainer.pl -f util/cutils.c hw/ide/core.c
          Kevin Wolf <kwolf@redhat.com> (odd fixer:IDE)
          Stefan Hajnoczi <stefanha@redhat.com> (odd fixer:IDE)
      
      This behavior is taken even if --git-fallback is specified.
      
      2) warn the contributors about what we're doing, asking them to use their
      common sense:
      
          $ scripts/get_maintainer.pl -f util/cutils.c
          get_maintainer.pl: No maintainers found, printing recent contributors.
          get_maintainer.pl: Do not blindly cc: them on patches!  Use common sense.
      
          Luiz Capitulino <lcapitulino@redhat.com> (commit_signer:1/2=50%)
          ...
          $
      
      Explicitly disabling the fallback will not result in the warning message:
      
          $ scripts/get_maintainer.pl -f util/cutils.c   --no-git-fallback
          $ echo $?
          0
      
      (Returning 1 would break usage of scripts/get_maintainer.pl as a cccmd
      for git-send-email).
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      c6561586
    • P
      get_maintainer.pl: move git loop under "if ($email) {" · 8ad2c0f0
      Paolo Bonzini 提交于
      All checks in the loop are guarded by that condition, and there is a
      handy "if" just below.  Simplify the code.
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      8ad2c0f0
  9. 27 9月, 2014 2 次提交
  10. 26 9月, 2014 4 次提交
  11. 22 9月, 2014 1 次提交
  12. 03 9月, 2014 1 次提交
  13. 28 8月, 2014 2 次提交
  14. 26 8月, 2014 1 次提交
  15. 12 8月, 2014 11 次提交
  16. 04 8月, 2014 1 次提交
    • A
      checker: ignore fields marked unused · 32ce1b48
      Amit Shah 提交于
      While comparing qemu-1.0 json output with qemu-2.1, a few fields got
      marked unused.  These need to be skipped over, and not flagged as
      mismatches.
      
      For handling unused fields, the exact number of bytes need to be skipped
      over as the size of the unused field.
      
      Currently, only the term "unused" is matched.  When more field names
      turn up, this will have to be updated based on the whitelist matching
      method to match more such terms.
      Signed-off-by: NAmit Shah <amit.shah@redhat.com>
      32ce1b48
  17. 22 7月, 2014 1 次提交
  18. 16 7月, 2014 1 次提交
  19. 27 6月, 2014 1 次提交