qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] aes: Remove unused code (NDEBUG, u16)
@ 2013-06-29 15:10 Stefan Weil
  2013-07-19 18:51 ` Stefan Weil
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Weil @ 2013-06-29 15:10 UTC (permalink / raw)
  Cc: Stefan Weil, qemu-devel

The current code includes assert.h very early (from qemu-common.h),
so the definition of NDEBUG was without any effect.

In the initial version from 2004, NDEBUG was used to disable the assertions.
Those assertions are not in time critical code, so it is no longer
reasonable to disable them and the definition of NDEBUG can be removed.

Type u16 is also unused and therefore does not need a type definition.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
---
 util/aes.c |    5 -----
 1 file changed, 5 deletions(-)

diff --git a/util/aes.c b/util/aes.c
index 91e97fa..4b4d88e 100644
--- a/util/aes.c
+++ b/util/aes.c
@@ -30,12 +30,7 @@
 #include "qemu-common.h"
 #include "qemu/aes.h"
 
-#ifndef NDEBUG
-#define NDEBUG
-#endif
-
 typedef uint32_t u32;
-typedef uint16_t u16;
 typedef uint8_t u8;
 
 /* This controls loop-unrolling in aes_core.c */
-- 
1.7.10.4

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

* Re: [Qemu-devel] [PATCH] aes: Remove unused code (NDEBUG, u16)
  2013-06-29 15:10 [Qemu-devel] [PATCH] aes: Remove unused code (NDEBUG, u16) Stefan Weil
@ 2013-07-19 18:51 ` Stefan Weil
  2013-07-22 17:29   ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Weil @ 2013-07-19 18:51 UTC (permalink / raw)
  To: qemu-trivial; +Cc: qemu-devel

Am 29.06.2013 17:10, schrieb Stefan Weil:
> The current code includes assert.h very early (from qemu-common.h),
> so the definition of NDEBUG was without any effect.
>
> In the initial version from 2004, NDEBUG was used to disable the assertions.
> Those assertions are not in time critical code, so it is no longer
> reasonable to disable them and the definition of NDEBUG can be removed.
>
> Type u16 is also unused and therefore does not need a type definition.
>
> Signed-off-by: Stefan Weil <sw@weilnetz.de>
> ---
>  util/aes.c |    5 -----
>  1 file changed, 5 deletions(-)
>
> diff --git a/util/aes.c b/util/aes.c
> index 91e97fa..4b4d88e 100644
> --- a/util/aes.c
> +++ b/util/aes.c
> @@ -30,12 +30,7 @@
>  #include "qemu-common.h"
>  #include "qemu/aes.h"
>  
> -#ifndef NDEBUG
> -#define NDEBUG
> -#endif
> -
>  typedef uint32_t u32;
> -typedef uint16_t u16;
>  typedef uint8_t u8;
>  
>  /* This controls loop-unrolling in aes_core.c */


Please apply this patch to the qemu-trivial queue,
and maybe this one, too: http://patchwork.ozlabs.org/patch/257416/.

Thanks,
Stefan

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

* Re: [Qemu-devel] [Qemu-trivial] [PATCH] aes: Remove unused code (NDEBUG, u16)
  2013-07-19 18:51 ` Stefan Weil
@ 2013-07-22 17:29   ` Michael Tokarev
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Tokarev @ 2013-07-22 17:29 UTC (permalink / raw)
  To: Stefan Weil; +Cc: qemu-trivial, qemu-devel

19.07.2013 22:51, Stefan Weil wrote:
> Am 29.06.2013 17:10, schrieb Stefan Weil:
>> The current code includes assert.h very early (from qemu-common.h),
>> so the definition of NDEBUG was without any effect.

>> Type u16 is also unused and therefore does not need a type definition.

Thanks, applied to the trivial patches queue.

/mjt

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

end of thread, other threads:[~2013-07-22 17:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-29 15:10 [Qemu-devel] [PATCH] aes: Remove unused code (NDEBUG, u16) Stefan Weil
2013-07-19 18:51 ` Stefan Weil
2013-07-22 17:29   ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).