diff options
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/cmd/fm/eversholt/common/eft.h | 9 | ||||
-rw-r--r-- | usr/src/cmd/fm/eversholt/common/eftread.c | 4 | ||||
-rw-r--r-- | usr/src/cmd/fm/eversholt/common/esclex.c | 24 | ||||
-rw-r--r-- | usr/src/cmd/fm/eversholt/common/escparse.y | 4 | ||||
-rw-r--r-- | usr/src/cmd/fm/eversholt/common/out.h | 4 | ||||
-rw-r--r-- | usr/src/cmd/fm/eversholt/common/stable.c | 15 | ||||
-rw-r--r-- | usr/src/cmd/fm/modules/common/eversholt/config_impl.h | 4 | ||||
-rw-r--r-- | usr/src/cmd/fm/modules/common/eversholt/fme.c | 4 | ||||
-rw-r--r-- | usr/src/cmd/fm/modules/common/eversholt/iexpr.c | 10 | ||||
-rw-r--r-- | usr/src/cmd/fm/modules/common/eversholt/itree.c | 6 | ||||
-rw-r--r-- | usr/src/cmd/fm/modules/common/eversholt/platform.c | 5 |
11 files changed, 46 insertions, 43 deletions
diff --git a/usr/src/cmd/fm/eversholt/common/eft.h b/usr/src/cmd/fm/eversholt/common/eft.h index 4f9ef788d1..dbc967c993 100644 --- a/usr/src/cmd/fm/eversholt/common/eft.h +++ b/usr/src/cmd/fm/eversholt/common/eft.h @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. * * eft.h -- public definitions for eft files @@ -36,6 +35,8 @@ extern "C" { #endif +#include <stdint.h> + /* eft file header */ #define EFT_HDR_MAGIC 0x45465400 #define EFT_HDR_MAJOR 3 diff --git a/usr/src/cmd/fm/eversholt/common/eftread.c b/usr/src/cmd/fm/eversholt/common/eftread.c index c4d011db27..b5f435691f 100644 --- a/usr/src/cmd/fm/eversholt/common/eftread.c +++ b/usr/src/cmd/fm/eversholt/common/eftread.c @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. * * eftread.c -- routines for reading .eft files @@ -51,7 +51,9 @@ #include <netinet/in.h> #include <inttypes.h> +#ifndef MIN #define MIN(x, y) ((x) <= (y) ? (x) : (y)) +#endif static int Showheader; diff --git a/usr/src/cmd/fm/eversholt/common/esclex.c b/usr/src/cmd/fm/eversholt/common/esclex.c index 4fdcdbaf58..3381795c5e 100644 --- a/usr/src/cmd/fm/eversholt/common/esclex.c +++ b/usr/src/cmd/fm/eversholt/common/esclex.c @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. * * esclex.c -- lexer for esc @@ -175,7 +175,7 @@ static const struct { */ static struct lut * -lex_s2i_lut_add(struct lut *root, const char *s, int i) +lex_s2i_lut_add(struct lut *root, const char *s, intptr_t i) { return (lut_add(root, (void *)s, (void *)i, NULL)); } @@ -183,7 +183,7 @@ lex_s2i_lut_add(struct lut *root, const char *s, int i) static int lex_s2i_lut_lookup(struct lut *root, const char *s) { - return ((int)lut_lookup(root, (void *)s, NULL)); + return ((intptr_t)lut_lookup(root, (void *)s, NULL)); } static struct lut * @@ -442,8 +442,8 @@ yylex() if (c == '\n') Line++; else if (c == '*' && - (((c = getc(Fp)) == EOF) || - (c == '/'))) + (((c = getc(Fp)) == EOF) || + (c == '/'))) break; } if (c == EOF) { @@ -638,7 +638,7 @@ yylex() for (;;) { c = getc(Fp); if ((isalnum(c) || c == '_') && - ptr < eptr) + ptr < eptr) *ptr++ = c; else { (void) ungetc(c, Fp); @@ -712,12 +712,12 @@ dumpline(int flags) switch (Recorded[i].tok) { case T_QUOTE: out(flags|O_NONL, " \"%s\"", - Recorded[i].s); + Recorded[i].s); break; default: out(flags|O_NONL, " %s", - Recorded[i].s); + Recorded[i].s); break; } else @@ -727,7 +727,7 @@ dumpline(int flags) break; case ARROW: out(flags|O_NONL, " ->%s", - Recorded[i].s); + Recorded[i].s); break; case EQ: out(flags|O_NONL, " =="); @@ -756,10 +756,10 @@ dumpline(int flags) default: if (isprint(Recorded[i].tok)) out(flags|O_NONL, " %c", - Recorded[i].tok); + Recorded[i].tok); else out(flags|O_NONL, " '\\%03o'", - Recorded[i].tok); + Recorded[i].tok); break; } out(flags, NULL); @@ -903,7 +903,7 @@ doallow_cycles() (void) check_cycle_level(newlevel); outfl(O_VERB, File, Line, "pragma set: allow_cycles (%s)", - newlevel ? "no warnings" : "with warnings"); + newlevel ? "no warnings" : "with warnings"); } /* diff --git a/usr/src/cmd/fm/eversholt/common/escparse.y b/usr/src/cmd/fm/eversholt/common/escparse.y index 8f48020ebc..3c16fe23f5 100644 --- a/usr/src/cmd/fm/eversholt/common/escparse.y +++ b/usr/src/cmd/fm/eversholt/common/escparse.y @@ -19,7 +19,7 @@ * * CDDL HEADER END * - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. * * escparse.y -- parser for esc @@ -89,7 +89,7 @@ %type <tok> enameid %type <np> root stmtlist stmt nvpairlist nvpair nvname nvexpr %type <np> exprlist expr iterid ename pname epname eexprlist ipname iname -%type <np> numexpr cexpr func pfunc parglist, parg +%type <np> numexpr cexpr func pfunc parglist parg %type <np> eventlist event nork norkexpr globid propbody %% diff --git a/usr/src/cmd/fm/eversholt/common/out.h b/usr/src/cmd/fm/eversholt/common/out.h index 12e798e577..1c58378494 100644 --- a/usr/src/cmd/fm/eversholt/common/out.h +++ b/usr/src/cmd/fm/eversholt/common/out.h @@ -20,7 +20,7 @@ */ /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. * * out.h -- public definitions for output module @@ -36,6 +36,8 @@ #pragma ident "%Z%%M% %I% %E% SMI" #include <stdio.h> +#include <sys/ccompile.h> +#include <inttypes.h> #ifdef __cplusplus extern "C" { diff --git a/usr/src/cmd/fm/eversholt/common/stable.c b/usr/src/cmd/fm/eversholt/common/stable.c index 1a4e79d9b1..8774bdee42 100644 --- a/usr/src/cmd/fm/eversholt/common/stable.c +++ b/usr/src/cmd/fm/eversholt/common/stable.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. * * stable.c -- string table module @@ -156,7 +155,7 @@ stable(const char *s) for (sptr = &s[1]; *sptr; sptr++) { slen++; hash ^= (((unsigned)*sptr) << (slen % 3)) + - ((unsigned)*(sptr - 1) << ((slen % 3 + 7))); + ((unsigned)*(sptr - 1) << ((slen % 3 + 7))); } hash ^= slen; if (slen > CHUNK_SIZE - sizeof (char *) - 1 - 4) @@ -177,7 +176,7 @@ stable(const char *s) while (*eptr) eptr++; eptr++; /* move past '\0' */ - while ((unsigned)eptr % MINPTR_ALIGN) + while ((uintptr_t)eptr % MINPTR_ALIGN) eptr++; /* pull in next pointer in bucket */ ptrp = (char **)(void *)eptr; @@ -187,7 +186,7 @@ stable(const char *s) /* string wasn't in table, add it and point ptr to it */ if (Stablenext == NULL || (&Stableblock[CHUNK_SIZE] - Stablenext) < - (slen + sizeof (char *) + MINPTR_ALIGN + 4)) { + (slen + sizeof (char *) + MINPTR_ALIGN + 4)) { /* need more room */ Stablenext = Stableblock = stable_newchunk(); } @@ -196,7 +195,7 @@ stable(const char *s) sptr = s; while (*Stablenext++ = *sptr++) ; - while ((unsigned)Stablenext % MINPTR_ALIGN) + while ((uintptr_t)Stablenext % MINPTR_ALIGN) Stablenext++; ptrp = (char **)(void *)Stablenext; Stablenext += sizeof (char *); diff --git a/usr/src/cmd/fm/modules/common/eversholt/config_impl.h b/usr/src/cmd/fm/modules/common/eversholt/config_impl.h index c80c0ce051..d018a470e2 100644 --- a/usr/src/cmd/fm/modules/common/eversholt/config_impl.h +++ b/usr/src/cmd/fm/modules/common/eversholt/config_impl.h @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -43,7 +43,7 @@ struct config { struct config *child; struct config *parent; const char *s; - int num; + intptr_t num; struct lut *props; }; diff --git a/usr/src/cmd/fm/modules/common/eversholt/fme.c b/usr/src/cmd/fm/modules/common/eversholt/fme.c index 39654219bb..63565493e3 100644 --- a/usr/src/cmd/fm/modules/common/eversholt/fme.c +++ b/usr/src/cmd/fm/modules/common/eversholt/fme.c @@ -841,7 +841,7 @@ globals_destructor(void *left, void *right, void *arg) struct evalue *evp = (struct evalue *)right; if (evp->t == NODEPTR) tree_free((struct node *)(uintptr_t)evp->v); - evp->v = NULL; + evp->v = (uintptr_t)NULL; FREE(evp); } @@ -985,7 +985,7 @@ serd_eval(struct fme *fmep, fmd_hdl_t *hdl, fmd_event_t *ffep, serdinst = eventprop_lookup(sp, L_engine); if (serdinst == NULL) - return (NULL); + return (0); serdname = ipath2str(serdinst->u.stmt.np->u.event.ename->u.name.s, ipath(serdinst->u.stmt.np->u.event.epname)); diff --git a/usr/src/cmd/fm/modules/common/eversholt/iexpr.c b/usr/src/cmd/fm/modules/common/eversholt/iexpr.c index 7c6ed97fe1..8d255d192f 100644 --- a/usr/src/cmd/fm/modules/common/eversholt/iexpr.c +++ b/usr/src/cmd/fm/modules/common/eversholt/iexpr.c @@ -20,7 +20,7 @@ */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. * * iexpr.c -- instanced expression cache module @@ -75,7 +75,7 @@ iexpr_hash(struct node *np) switch (np->t) { case T_GLOBID: - return ((int)np->u.globid.s); + return ((uintptr_t)np->u.globid.s); case T_ASSIGN: case T_CONDIF: @@ -106,18 +106,18 @@ iexpr_hash(struct node *np) iexpr_hash(np->u.expr.right))); case T_NAME: - return ((int)np->u.name.s); + return ((uintptr_t)np->u.name.s); case T_EVENT: return (iexpr_hash(np->u.event.ename) + iexpr_hash(np->u.event.epname)); case T_FUNC: - return ((int)np->u.func.s + + return ((uintptr_t)np->u.func.s + iexpr_hash(np->u.func.arglist)); case T_QUOTE: - return ((int)np->u.quote.s); + return ((uintptr_t)np->u.quote.s); case T_NUM: return ((int)np->u.ull); diff --git a/usr/src/cmd/fm/modules/common/eversholt/itree.c b/usr/src/cmd/fm/modules/common/eversholt/itree.c index d4afe47919..500c144a86 100644 --- a/usr/src/cmd/fm/modules/common/eversholt/itree.c +++ b/usr/src/cmd/fm/modules/common/eversholt/itree.c @@ -20,7 +20,7 @@ */ /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. * * itree.c -- instance tree creation and manipulation @@ -1394,7 +1394,7 @@ itree_pevent(struct event *lhs, struct event *ep, void *arg) { struct plut_wlk_data propd; struct bubble *bp; - int flags = (int)arg; + int flags = (int)(intptr_t)arg; itree_pevent_brief(flags, ep); if (ep->t == N_EREPORT) @@ -1504,7 +1504,7 @@ itree_pbubble(int flags, struct bubble *bp) void itree_ptree(int flags, struct lut *itp) { - lut_walk(itp, (lut_cb)itree_pevent, (void *)flags); + lut_walk(itp, (lut_cb)itree_pevent, (void *)(intptr_t)flags); } /*ARGSUSED*/ diff --git a/usr/src/cmd/fm/modules/common/eversholt/platform.c b/usr/src/cmd/fm/modules/common/eversholt/platform.c index 1e7707c5f2..7119cf059c 100644 --- a/usr/src/cmd/fm/modules/common/eversholt/platform.c +++ b/usr/src/cmd/fm/modules/common/eversholt/platform.c @@ -18,9 +18,8 @@ * * CDDL HEADER END */ - /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. * * platform.c -- interfaces to the platform's configuration information @@ -371,7 +370,7 @@ hc_path(tnode_t *node) (void) strlcat(tmpbuf, "/", MAXPATHLEN); (void) strlcat(tmpbuf, name, MAXPATHLEN); - (void) snprintf(numbuf, MAXPATHLEN, "%u", ul); + (void) snprintf(numbuf, MAXPATHLEN, "%lu", ul); (void) strlcat(tmpbuf, numbuf, MAXPATHLEN); lastcomp = stable(name); } |