diff mbox

NSM: Replace __attribute_noinline__

Message ID 20101122163637.17565.13193.stgit@matisse.1015granger.net (mailing list archive)
State Awaiting Upstream, archived
Headers show

Commit Message

Chuck Lever Nov. 22, 2010, 4:38 p.m. UTC
None
diff mbox

Patch

=== cut here ===

This is curious, because this is a modern compiler (gcc 4.4.5) with
an old version of glibc.  I wouldn't expect a compiler attribute
complaint due to an old version of the C library, but what do I know.

To try to address this, replace the __attribute_noinline__ form with
__attribute__((noinline)).  Even though the compiler didn't complain
about __attribute_malloc__, also replace those in order to maintain
consistent style throughout the source file.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---

Gabor-

Can you try this out?  Either it will fix the problem, or it will tell
us more about the issue.

 support/nsm/file.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/support/nsm/file.c b/support/nsm/file.c
index f4baeb9..fd9171e 100644
--- a/support/nsm/file.c
+++ b/support/nsm/file.c
@@ -126,7 +126,7 @@  exact_error_check(const ssize_t len, const size_t buflen)
  * containing an appropriate pathname, or NULL if an error
  * occurs.  Caller must free the returned result with free(3).
  */
-__attribute_malloc__
+__attribute__((malloc))
 static char *
 nsm_make_record_pathname(const char *directory, const char *hostname)
 {
@@ -174,7 +174,7 @@  nsm_make_record_pathname(const char *directory, const char *hostname)
  * containing an appropriate pathname, or NULL if an error
  * occurs.  Caller must free the returned result with free(3).
  */
-__attribute_malloc__
+__attribute__((malloc))
 static char *
 nsm_make_pathname(const char *directory)
 {
@@ -204,7 +204,7 @@  nsm_make_pathname(const char *directory)
  * containing an appropriate pathname, or NULL if an error
  * occurs.  Caller must free the returned result with free(3).
  */
-__attribute_malloc__
+__attribute__((malloc))
 static char *
 nsm_make_temp_pathname(const char *pathname)
 {
@@ -634,7 +634,7 @@  nsm_priv_to_hex(const char *priv, char *buf, const size_t buflen)
 /*
  * Returns the length in bytes of the created record.
  */
-__attribute_noinline__
+__attribute__((noinline))
 static size_t
 nsm_create_monitor_record(char *buf, const size_t buflen,
 		const struct sockaddr *sap, const struct mon *m)
@@ -784,7 +784,7 @@  out:
 	return result;
 }
 
-__attribute_noinline__
+__attribute__((noinline))
 static _Bool
 nsm_parse_line(char *line, struct sockaddr_in *sin, struct mon *m)
 {