From: Sascha Hauer <s.hauer@pengutronix.de>
To: Masaki Muranaka <monaka@monami-ya.jp>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 1/3] Remove unnesessory malloc.h inclusions.
Date: Mon, 3 Jun 2013 09:24:27 +0200 [thread overview]
Message-ID: <20130603072427.GW32299@pengutronix.de> (raw)
In-Reply-To: <1370184829-66576-1-git-send-email-monaka@monami-ya.com>
On Sun, Jun 02, 2013 at 11:53:47PM +0900, Masaki Muranaka wrote:
> ---
> diff --git a/common/resource.c b/common/resource.c
> index 5795e79..954357e 100644
> --- a/common/resource.c
> +++ b/common/resource.c
> @@ -16,7 +16,6 @@
> * GNU General Public License for more details.
> */
> #include <common.h>
> -#include <malloc.h>
> #include <errno.h>
> #include <init.h>
> #include <linux/ioport.h>
Applying this patch leads to several compiler warnings:
common/resource.c: In function 'release_region':
common/resource.c:105:2: warning: implicit declaration of function 'free' [-Wimplicit-function-declaration]
commands/readline.c: In function 'do_readline':
commands/readline.c:33:3: warning: implicit declaration of function 'free' [-Wimplicit-function-declaration]
commands/time.c: In function 'do_time':
commands/time.c:41:2: warning: implicit declaration of function 'free' [-Wimplicit-function-declaration]
commands/oftree.c: In function 'do_oftree':
commands/oftree.c:197:2: warning: implicit declaration of function 'free' [-Wimplicit-function-declaration]
commands/readlink.c: In function 'do_readlink':
commands/readlink.c:58:3: warning: implicit declaration of function 'free' [-Wimplicit-function-declaration]
commands/global.c: In function 'globalvar_set':
commands/global.c:34:3: warning: implicit declaration of function 'free' [-Wimplicit-function-declaration]
So indeed we do not use malloc in these files, but we still use free.
I think you would have to replace the includes with #include <stdlib.h>
rather than removing them completely.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2013-06-03 7:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-02 14:53 Masaki Muranaka
2013-06-02 14:53 ` [PATCH 2/3] Refactor malloc.h Masaki Muranaka
2013-06-03 7:26 ` Sascha Hauer
2013-06-03 8:02 ` Masaki Muranaka
2013-06-02 14:53 ` [PATCH 3/3] Use stdlib.h instead of malloc.h Masaki Muranaka
2013-06-03 7:24 ` Sascha Hauer [this message]
2013-06-03 7:55 ` [PATCH 1/3] Remove unnesessory malloc.h inclusions Masaki Muranaka
2013-06-04 12:38 Masaki Muranaka
2013-06-05 6:34 ` Sascha Hauer
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=20130603072427.GW32299@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=monaka@monami-ya.jp \
/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