All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [BUG 2.6] Broken CONFIG_TPM?
@ 2016-04-28 20:33 Stefan Weil
  2016-04-28 21:07 ` [Qemu-devel] [BUG 2.6] Compiler warnings (clang) in 2.6 (was: Broken CONFIG_TPM?) Stefan Weil
  2016-04-29  7:42 ` [Qemu-devel] [BUG 2.6] Broken CONFIG_TPM? Markus Armbruster
  0 siblings, 2 replies; 4+ messages in thread
From: Stefan Weil @ 2016-04-28 20:33 UTC (permalink / raw)
  To: QEMU Developer; +Cc: Peter Maydell

A compilation test with clang -Weverything reported this problem:

config-host.h:112:20: warning: '$' in identifier
[-Wdollar-in-identifier-extension]

The line of code looks like this:

#define CONFIG_TPM $(CONFIG_SOFTMMU)

This is fine for Makefile code, but won't work as expected in C code.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [BUG 2.6] Compiler warnings (clang) in 2.6 (was: Broken CONFIG_TPM?)
  2016-04-28 20:33 [Qemu-devel] [BUG 2.6] Broken CONFIG_TPM? Stefan Weil
@ 2016-04-28 21:07 ` Stefan Weil
  2016-04-29  7:42 ` [Qemu-devel] [BUG 2.6] Broken CONFIG_TPM? Markus Armbruster
  1 sibling, 0 replies; 4+ messages in thread
From: Stefan Weil @ 2016-04-28 21:07 UTC (permalink / raw)
  To: qemu-devel

Am 28.04.2016 um 22:33 schrieb Stefan Weil:
> A compilation test with clang -Weverything reported this problem:
>
> config-host.h:112:20: warning: '$' in identifier
> [-Wdollar-in-identifier-extension]
>
> The line of code looks like this:
>
> #define CONFIG_TPM $(CONFIG_SOFTMMU)
>
> This is fine for Makefile code, but won't work as expected in C code.
>

A complete 64 bit build with clang -Weverything creates a log file of
1.7 GB.
Here are the uniq warnings sorted by their frequency:

      1 -Wflexible-array-extensions
      1 -Wgnu-folding-constant
      1 -Wunknown-pragmas
      1 -Wunknown-warning-option
      1 -Wunreachable-code-loop-increment
      2 -Warray-bounds-pointer-arithmetic
      2 -Wdollar-in-identifier-extension
      3 -Woverlength-strings
      3 -Wweak-vtables
      4 -Wgnu-empty-struct
      4 -Wstring-conversion
      6 -Wclass-varargs
      7 -Wc99-extensions
      7 -Wc++-compat
      8 -Wfloat-equal
     11 -Wformat-nonliteral
     16 -Wshift-negative-value
     19 -Wglobal-constructors
     28 -Wc++11-long-long
     29 -Wembedded-directive
     38 -Wvla
     40 -Wcovered-switch-default
     40 -Wmissing-variable-declarations
     49 -Wold-style-cast
     53 -Wgnu-conditional-omitted-operand
     56 -Wformat-pedantic
     61 -Wvariadic-macros
     77 -Wc++11-extensions
     83 -Wgnu-flexible-array-initializer
     83 -Wzero-length-array
     96 -Wgnu-designator
    102 -Wmissing-noreturn
    103 -Wconditional-uninitialized
    107 -Wdisabled-macro-expansion
    115 -Wunreachable-code-return
    134 -Wunreachable-code
    243 -Wunreachable-code-break
    257 -Wfloat-conversion
    280 -Wswitch-enum
    291 -Wpointer-arith
    298 -Wshadow
    378 -Wassign-enum
    395 -Wused-but-marked-unused
    420 -Wreserved-id-macro
    493 -Wdocumentation
    510 -Wshift-sign-overflow
    565 -Wgnu-case-range
    566 -Wgnu-zero-variadic-macro-arguments
    650 -Wbad-function-cast
    705 -Wmissing-field-initializers
    817 -Wgnu-statement-expression
    968 -Wdocumentation-unknown-command
   1021 -Wextra-semi
   1112 -Wgnu-empty-initializer
   1138 -Wcast-qual
   1509 -Wcast-align
   1766 -Wextended-offsetof
   1937 -Wsign-compare
   2130 -Wpacked
   2404 -Wunused-macros
   3081 -Wpadded
   4182 -Wconversion
   5430 -Wlanguage-extension-token
   6655 -Wshorten-64-to-32
   6995 -Wpedantic
   7354 -Wunused-parameter
  27659 -Wsign-conversion

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [BUG 2.6] Broken CONFIG_TPM?
  2016-04-28 20:33 [Qemu-devel] [BUG 2.6] Broken CONFIG_TPM? Stefan Weil
  2016-04-28 21:07 ` [Qemu-devel] [BUG 2.6] Compiler warnings (clang) in 2.6 (was: Broken CONFIG_TPM?) Stefan Weil
@ 2016-04-29  7:42 ` Markus Armbruster
  2016-05-02 16:23   ` Peter Maydell
  1 sibling, 1 reply; 4+ messages in thread
From: Markus Armbruster @ 2016-04-29  7:42 UTC (permalink / raw)
  To: Stefan Weil; +Cc: QEMU Developer, Peter Maydell, Paolo Bonzini

Stefan Weil <stefan.weil@weilnetz.de> writes:

> A compilation test with clang -Weverything reported this problem:
>
> config-host.h:112:20: warning: '$' in identifier
> [-Wdollar-in-identifier-extension]
>
> The line of code looks like this:
>
> #define CONFIG_TPM $(CONFIG_SOFTMMU)
>
> This is fine for Makefile code, but won't work as expected in C code.

Broken in commit 3b8acc1 "configure: fix TPM logic".  Cc'ing Paolo.

Impact: #ifdef CONFIG_TPM never disables code.  There are no other uses
of CONFIG_TPM in C code.

I had a quick peek at configure and create_config, but refrained from
attempting to fix this, since I don't understand when exactly CONFIG_TPM
should be defined.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [BUG 2.6] Broken CONFIG_TPM?
  2016-04-29  7:42 ` [Qemu-devel] [BUG 2.6] Broken CONFIG_TPM? Markus Armbruster
@ 2016-05-02 16:23   ` Peter Maydell
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2016-05-02 16:23 UTC (permalink / raw)
  To: Markus Armbruster; +Cc: Stefan Weil, QEMU Developer, Paolo Bonzini

On 29 April 2016 at 08:42, Markus Armbruster <armbru@redhat.com> wrote:
> Stefan Weil <stefan.weil@weilnetz.de> writes:
>
>> A compilation test with clang -Weverything reported this problem:
>>
>> config-host.h:112:20: warning: '$' in identifier
>> [-Wdollar-in-identifier-extension]
>>
>> The line of code looks like this:
>>
>> #define CONFIG_TPM $(CONFIG_SOFTMMU)
>>
>> This is fine for Makefile code, but won't work as expected in C code.
>
> Broken in commit 3b8acc1 "configure: fix TPM logic".  Cc'ing Paolo.
>
> Impact: #ifdef CONFIG_TPM never disables code.  There are no other uses
> of CONFIG_TPM in C code.
>
> I had a quick peek at configure and create_config, but refrained from
> attempting to fix this, since I don't understand when exactly CONFIG_TPM
> should be defined.

Looking at 'git blame' suggests this has been wrong like this for
some years, so we don't need to scramble to fix it for 2.6.

thanks
-- PMM

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-05-02 16:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-28 20:33 [Qemu-devel] [BUG 2.6] Broken CONFIG_TPM? Stefan Weil
2016-04-28 21:07 ` [Qemu-devel] [BUG 2.6] Compiler warnings (clang) in 2.6 (was: Broken CONFIG_TPM?) Stefan Weil
2016-04-29  7:42 ` [Qemu-devel] [BUG 2.6] Broken CONFIG_TPM? Markus Armbruster
2016-05-02 16:23   ` Peter Maydell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.