From: Ramsay Jones <ramsay@ramsayjones.plus.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Carlo Marcelo Arenas Belón" <carenas@gmail.com>,
"Derrick Stolee" <stolee@gmail.com>,
"GIT Mailing-list" <git@vger.kernel.org>
Subject: [PATCH 2/3] ewok_rlw.h: add missing 'inline' to function definition
Date: Sat, 27 Oct 2018 02:52:05 +0100 [thread overview]
Message-ID: <1a465da6-d139-5880-72ff-c612b42c3b8f@ramsayjones.plus.com> (raw)
The 'ewok_rlw.h' header file contains the rlw_get_run_bit() function
definition, which is marked as 'static' but not 'inline'. At least when
compiled by gcc, with the default -O2 optimization level, the function
is actually inlined and leaves no static version in the ewah_bitmap.o
and ewah_rlw.o object files. Despite this, add the missing 'inline'
keyword to better describe the intended behaviour.
Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
---
ewah/ewok_rlw.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ewah/ewok_rlw.h b/ewah/ewok_rlw.h
index d487966935..bafa24f4c3 100644
--- a/ewah/ewok_rlw.h
+++ b/ewah/ewok_rlw.h
@@ -31,7 +31,7 @@
#define RLW_RUNNING_LEN_PLUS_BIT (((eword_t)1 << (RLW_RUNNING_BITS + 1)) - 1)
-static int rlw_get_run_bit(const eword_t *word)
+static inline int rlw_get_run_bit(const eword_t *word)
{
return *word & (eword_t)1;
}
--
2.19.0
next reply other threads:[~2018-10-27 1:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-27 1:52 Ramsay Jones [this message]
2018-10-27 6:29 ` [PATCH 2/3] ewok_rlw.h: add missing 'inline' to function definition Jeff King
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1a465da6-d139-5880-72ff-c612b42c3b8f@ramsayjones.plus.com \
--to=ramsay@ramsayjones.plus.com \
--cc=carenas@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=stolee@gmail.com \
/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://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).