From: Nikolas Garofil <nikolas@garofil.be>
To: zsh-workers@zsh.org
Subject: [PATCH 4/6] strict compilers don't like pointers that get set but are never used
Date: Sat, 7 Jun 2014 19:18:53 +0200 [thread overview]
Message-ID: <1402161535-20756-4-git-send-email-nikolas@garofil.be> (raw)
In-Reply-To: <1402161535-20756-1-git-send-email-nikolas@garofil.be>
---
Src/mem.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Src/mem.c b/Src/mem.c
index a7f11a6..f198177 100644
--- a/Src/mem.c
+++ b/Src/mem.c
@@ -1508,7 +1508,7 @@ zsfree(char *p)
MALLOC_RET_T
realloc(MALLOC_RET_T p, MALLOC_ARG_T size)
{
- struct m_hdr *m = (struct m_hdr *)(((char *)p) - M_ISIZE), *mp, *mt;
+ struct m_hdr *m = (struct m_hdr *)(((char *)p) - M_ISIZE), *mt;
char *r;
int i, l = 0;
@@ -1524,10 +1524,10 @@ realloc(MALLOC_RET_T p, MALLOC_ARG_T size)
/* check if we are reallocating a small block, if we do, we have
to compute the size of the block from the sort of block it is in */
for (i = 0; i < M_NSMALL; i++) {
- for (mp = NULL, mt = m_small[i];
+ for (mt = m_small[i];
mt && (((char *)mt) > ((char *)p) ||
(((char *)mt) + mt->len) < ((char *)p));
- mp = mt, mt = mt->next);
+ mt = mt->next);
if (mt) {
l = M_BSLEN(mt->len);
--
1.8.3.2
next prev parent reply other threads:[~2014-06-07 17:26 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-07 17:18 [PATCH 1/6] fix implicit typecast for strict compilers Nikolas Garofil
2014-06-07 17:18 ` [PATCH 2/6] strict compilers expect the number of bytes to be a size_t for bcopy Nikolas Garofil
2014-06-07 19:20 ` Bart Schaefer
2014-06-07 19:29 ` Nikolas Garofil
2014-06-07 17:18 ` [PATCH 3/6] make sure signal_suspend doesn't return a undefined value Nikolas Garofil
2014-06-07 17:18 ` Nikolas Garofil [this message]
2014-06-07 17:18 ` [PATCH 5/6] memmove is expected to return dest Nikolas Garofil
2014-06-07 19:15 ` Bart Schaefer
2014-06-07 17:18 ` [PATCH 6/6] decr and tmp are only used when HAVE_STRFTIME is defined, strict compilers will complain Nikolas Garofil
2014-06-07 19:04 ` [PATCH 1/6] fix implicit typecast for strict compilers Bart Schaefer
2014-06-07 19:13 ` Nikolas Garofil
2014-06-07 19:36 ` Bart Schaefer
2014-06-07 19:43 ` Nikolas Garofil
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=1402161535-20756-4-git-send-email-nikolas@garofil.be \
--to=nikolas@garofil.be \
--cc=zsh-workers@zsh.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.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
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).