qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: qemu-devel@nongnu.org, f4bug@amsat.org
Subject: Re: [Qemu-devel] [PATCH v2 01/19] Use #include "..." for our own headers, <...> for others
Date: Thu, 1 Feb 2018 07:08:11 -0600	[thread overview]
Message-ID: <d0ac1a47-2878-74d0-fe3a-f2974d876e6b@redhat.com> (raw)
In-Reply-To: <87fu6lrxoc.fsf@dusky.pond.sub.org>

[-- Attachment #1: Type: text/plain, Size: 1243 bytes --]

On 02/01/2018 01:12 AM, Markus Armbruster wrote:

>>> +
>>>  #include "qemu/osdep.h"
>>> +#include <memory.h>
>>
>> <memory.h> is an obsolete spelling for the now-universal <string.h>.  We
>> should NEVER need to include it; scripts/clean-includes should be taught
>> to blacklist this one.
> 
> "Programming today is a race between software engineers striving to
> build bigger and better idiot-proof programs, and the Universe trying to
> produce bigger and better idiots.  So far, the Universe is winning."
> 
> My point is: if we extended our tooling every time we see a mistake,
> we'll drown in tooling.  I think we should limit ourselves to *common*
> mistakes.  Is this one common?

Perhaps not; a tendency when writing a new file is to copy-and-paste a
list of includes from another file, then add more if things still don't
compile.  Since adding memory.h never changes whether compilation will
work (unless you forgot osdep.h in the first place, and thereby missed
string.h), and if we eradicate all current uses of memory.h, new uses
won't have the bad example to copy from.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 619 bytes --]

  reply	other threads:[~2018-02-01 13:08 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-31 14:48 [Qemu-devel] [PATCH v2 00/19] Clean up includes to reduce compile time Markus Armbruster
2018-01-31 14:48 ` [Qemu-devel] [PATCH v2 01/19] Use #include "..." for our own headers, <...> for others Markus Armbruster
2018-01-31 14:59   ` Eric Blake
2018-02-01  7:12     ` Markus Armbruster
2018-02-01 13:08       ` Eric Blake [this message]
2018-01-31 15:40   ` Thomas Huth
2018-02-01  6:57     ` Markus Armbruster
2018-02-01  8:17       ` Thomas Huth
2018-01-31 14:48 ` [Qemu-devel] [PATCH v2 02/19] Clean up includes Markus Armbruster
2018-01-31 15:06   ` Eric Blake
2018-02-01  7:15     ` Markus Armbruster
2018-01-31 15:48   ` Thomas Huth
2018-02-01  2:27     ` Fam Zheng
2018-02-01  7:15       ` Markus Armbruster
2018-01-31 16:39   ` Philippe Mathieu-Daudé
2018-01-31 14:48 ` [Qemu-devel] [PATCH v2 03/19] Drop superfluous includes of qapi-types.h and test-qapi-types.h Markus Armbruster
2018-01-31 15:07   ` Eric Blake
2018-01-31 14:48 ` [Qemu-devel] [PATCH v2 04/19] Include qapi/error.h exactly where needed Markus Armbruster
2018-01-31 15:16   ` Eric Blake
2018-02-01  7:18     ` Markus Armbruster
2018-01-31 14:48 ` [Qemu-devel] [PATCH v2 05/19] Drop superfluous includes of qapi/qmp/qerror.h Markus Armbruster
2018-01-31 14:48 ` [Qemu-devel] [PATCH v2 06/19] Include qmp-commands.h exactly where needed Markus Armbruster
2018-01-31 14:48 ` [Qemu-devel] [PATCH v2 07/19] Typedef the subtypes of QObject in qemu/typedefs.h, too Markus Armbruster
2018-01-31 14:48 ` [Qemu-devel] [PATCH v2 08/19] Eliminate qapi/qmp/types.h Markus Armbruster
2018-01-31 14:48 ` [Qemu-devel] [PATCH v2 09/19] qdict qlist: Make most helper macros functions Markus Armbruster
2018-01-31 14:48 ` [Qemu-devel] [PATCH v2 10/19] Include qapi/qmp/qobject.h exactly where needed Markus Armbruster
2018-01-31 14:48 ` [Qemu-devel] [PATCH v2 11/19] Include qapi/qmp/qlist.h " Markus Armbruster
2018-01-31 14:48 ` [Qemu-devel] [PATCH v2 12/19] Include qapi/qmp/qdict.h " Markus Armbruster
2018-01-31 14:48 ` [Qemu-devel] [PATCH v2 13/19] Include qapi/qmp/qstring.h " Markus Armbruster
2018-01-31 14:48 ` [Qemu-devel] [PATCH v2 14/19] Include qapi/qmp/qbool.h " Markus Armbruster
2018-01-31 14:48 ` [Qemu-devel] [PATCH v2 15/19] Include qapi/qmp/qnum.h " Markus Armbruster
2018-01-31 14:48 ` [Qemu-devel] [PATCH v2 16/19] Include qapi/qmp/qnull.h " Markus Armbruster
2018-01-31 14:48 ` [Qemu-devel] [PATCH v2 17/19] Drop superfluous includes of qapi/qmp/dispatch.h Markus Armbruster
2018-01-31 14:48 ` [Qemu-devel] [PATCH v2 18/19] Drop superfluous includes of qapi/qmp/qjson.h Markus Armbruster
2018-01-31 14:48 ` [Qemu-devel] [PATCH v2 19/19] Move include qemu/option.h from qemu-common.h to actual users Markus Armbruster
2018-01-31 15:39 ` [Qemu-devel] [PATCH v2 00/19] Clean up includes to reduce compile time no-reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d0ac1a47-2878-74d0-fe3a-f2974d876e6b@redhat.com \
    --to=eblake@redhat.com \
    --cc=armbru@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).