Project

General

Profile

Bug #5705

lint building usr/src/lib/libumem/sparc/umem_genasm.c

Added by Gordon Ross over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Start date:
2015-03-12
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:

Description

Some more lint on sparc

umem_genasm.c:
envvar.c:
getpcstack.c:
malloc.c:
misc.c:
vmem_base.c:
umem.c:
vmem.c:
"/tank/ws/gwr/illumos-5106/usr/src/lib/libumem/common/umem_base.h", line 150: warning: function declared with variable number of args: umem_genasm in umem_genasm.c(35) and umem_base.h(150) (E_FUNC_DECL_VAR_ARG2)
"/tank/ws/gwr/illumos-5106/usr/src/lib/libumem/common/umem_base.h", line 150: warning: function argument declared inconsistently: umem_genasm(arg 2) in umem_genasm.c(35) int  and umem_base.h(150) struct umem_cache ** (E_INCONS_ARG_DECL2)
"/tank/ws/gwr/illumos-5106/usr/src/lib/libumem/common/umem_base.h", line 150: warning: function declared with variable number of args: umem_genasm in umem_genasm.c(35) and umem_base.h(150) (E_FUNC_DECL_VAR_ARG2)
"/tank/ws/gwr/illumos-5106/usr/src/lib/libumem/common/umem_base.h", line 150: warning: function argument declared inconsistently: umem_genasm(arg 2) in umem_genasm.c(35) int  and umem_base.h(150) struct umem_cache ** (E_INCONS_ARG_DECL2)
"/tank/ws/gwr/illumos-5106/usr/src/lib/libumem/common/umem_base.h", line 150: warning: function declared with variable number of args: umem_genasm in umem_genasm.c(35) and umem_base.h(150) (E_FUNC_DECL_VAR_ARG2)

etc.

#1

Updated by Gordon Ross over 5 years ago

  • Assignee set to Gordon Ross

Fix is pretty simple.

diff --git a/usr/src/lib/libumem/sparc/umem_genasm.c b/usr/src/lib/libumem/sparc/umem_genasm.c
index 4bdea8122db4839393ceae6b1ded8b6eb6b9e3c7..202d642b0b8fc825883f068f776130960ba29a66 100644
--- a/usr/src/lib/libumem/sparc/umem_genasm.c
+++ b/usr/src/lib/libumem/sparc/umem_genasm.c
@@ -19,7 +19,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright (c) 2012 Joyent, Inc.  All rights reserved.
+ * Copyright (c) 2014 Joyent, Inc.  All rights reserved.
  */

 /*
@@ -28,11 +28,16 @@
  * statement in lib/libumem/common/umem.c, particularly section eight.
  */

+#include <inttypes.h>
+#include <strings.h>
+#include <umem_impl.h>
+#include "umem_base.h" 
+
 const int umem_genasm_supported = 0;

 /*ARGSUSED*/
 int
-umem_genasm(int *cp, int nc)
+umem_genasm(int *alloc_sizes, umem_cache_t **caches, int ncaches)
 {
     return (1);
 }

#2

Updated by Gordon Ross over 5 years ago

  • Status changed from New to In Progress
#3

Updated by Electric Monk over 5 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

git commit 144f99a50481321408997219d433ad7cc8f0ef5e

commit  144f99a50481321408997219d433ad7cc8f0ef5e
Author: Gordon Ross <gwr@nexenta.com>
Date:   2015-03-18T02:38:56.000Z

    5705 lint building usr/src/lib/libumem/sparc/umem_genasm.c
    Reviewed by: Robert Mustacchi <rm@joyent.com>
    Approved by: Dan McDonald <danmcd@omniti.com>

Also available in: Atom PDF