Re: [RFC PATCH 2/5] Introduce new pretty formats %g and %G for reflog information

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Squash this patch on top, as

    cc1: warnings being treated as errors
    reflog-walk.c: In function 'get_reflog_message':
    reflog-walk.c:278: error: ISO C90 forbids mixed declarations and code

---

 reflog-walk.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/reflog-walk.c b/reflog-walk.c
index 929f025..5cbcb1a 100644
--- a/reflog-walk.c
+++ b/reflog-walk.c
@@ -270,12 +270,13 @@ void get_reflog_message(struct strbuf *sb,
 {
 	struct commit_reflog *commit_reflog = reflog_info->last_commit_reflog;
 	struct reflog_info *info;
+	size_t len;
 
 	if (!commit_reflog)
 		return;
 
 	info = &commit_reflog->reflogs->items[commit_reflog->recno+1];
-	size_t len = strlen(info->message);
+	len = strlen(info->message);
 	if (len > 0)
 		len--;
 	strbuf_add(sb, info->message, len);
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]