projects
/
unix-history
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
152ab39
)
Fix compiler warning.
author
Garrett Wollman
<wollman@FreeBSD.org>
Sun, 6 Feb 1994 07:35:24 +0000
(07:35 +0000)
committer
Garrett Wollman
<wollman@FreeBSD.org>
Sun, 6 Feb 1994 07:35:24 +0000
(07:35 +0000)
lib/libc/stdio/vfprintf.c
patch
|
blob
|
blame
|
history
lib/libc/stdlib/exit.c
patch
|
blob
|
blame
|
history
lib/libc/stdlib/strtol.c
patch
|
blob
|
blame
|
history
lib/libc/stdlib/strtoq.c
patch
|
blob
|
blame
|
history
lib/libc/stdlib/strtoul.c
patch
|
blob
|
blame
|
history
lib/libc/stdlib/strtouq.c
patch
|
blob
|
blame
|
history
diff --git
a/lib/libc/stdio/vfprintf.c
b/lib/libc/stdio/vfprintf.c
index
606102c
..
f813591
100644
(file)
--- a/
lib/libc/stdio/vfprintf.c
+++ b/
lib/libc/stdio/vfprintf.c
@@
-36,7
+36,7
@@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)vfprintf.c 5.50 (Berkeley) 12/16/92";*/
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)vfprintf.c 5.50 (Berkeley) 12/16/92";*/
-static char *rcsid = "$Id: vfprintf.c,v 1.
9 1993/11/04 02:26:10
jtc Exp $";
+static char *rcsid = "$Id: vfprintf.c,v 1.
4 1993/11/04 19:38:22
jtc Exp $";
#endif /* LIBC_SCCS and not lint */
/*
#endif /* LIBC_SCCS and not lint */
/*
@@
-475,7
+475,12
@@
reswitch: switch (ch) {
* -- ANSI X3J11
*/
/* NOSTRICT */
* -- ANSI X3J11
*/
/* NOSTRICT */
+ /* no easy way to tell in cpp how big a type is */
+#if defined(__i386)
+ _uquad = (u_quad_t)(u_long)va_arg(ap, void *);
+#else
_uquad = (u_quad_t)va_arg(ap, void *);
_uquad = (u_quad_t)va_arg(ap, void *);
+#endif
base = HEX;
xdigs = "0123456789abcdef";
flags |= HEXPREFIX;
base = HEX;
xdigs = "0123456789abcdef";
flags |= HEXPREFIX;
diff --git
a/lib/libc/stdlib/exit.c
b/lib/libc/stdlib/exit.c
index
0d3c725
..
50c872a
100644
(file)
--- a/
lib/libc/stdlib/exit.c
+++ b/
lib/libc/stdlib/exit.c
@@
-57,4
+57,6
@@
exit(status)
if (__cleanup)
(*__cleanup)();
_exit(status);
if (__cleanup)
(*__cleanup)();
_exit(status);
+ /* We'll never get here; this just surpresses a warning. */
+ while(1) { ; }
}
}
diff --git
a/lib/libc/stdlib/strtol.c
b/lib/libc/stdlib/strtol.c
index
000d876
..
1c1d5c9
100644
(file)
--- a/
lib/libc/stdlib/strtol.c
+++ b/
lib/libc/stdlib/strtol.c
@@
-124,6
+124,6
@@
strtol(nptr, endptr, base)
} else if (neg)
acc = -acc;
if (endptr != 0)
} else if (neg)
acc = -acc;
if (endptr != 0)
- *endptr = any ? s - 1 : (char *)nptr;
+ *endptr = any ?
(char *)
s - 1 : (char *)nptr;
return (acc);
}
return (acc);
}
diff --git
a/lib/libc/stdlib/strtoq.c
b/lib/libc/stdlib/strtoq.c
index
621d2a0
..
af02765
100644
(file)
--- a/
lib/libc/stdlib/strtoq.c
+++ b/
lib/libc/stdlib/strtoq.c
@@
-131,6
+131,6
@@
strtoq(nptr, endptr, base)
} else if (neg)
acc = -acc;
if (endptr != 0)
} else if (neg)
acc = -acc;
if (endptr != 0)
- *endptr = any ? s - 1 : (char *)nptr;
+ *endptr = any ?
(char *)
s - 1 : (char *)nptr;
return (acc);
}
return (acc);
}
diff --git
a/lib/libc/stdlib/strtoul.c
b/lib/libc/stdlib/strtoul.c
index
ed8c108
..
284c182
100644
(file)
--- a/
lib/libc/stdlib/strtoul.c
+++ b/
lib/libc/stdlib/strtoul.c
@@
-102,6
+102,6
@@
strtoul(nptr, endptr, base)
} else if (neg)
acc = -acc;
if (endptr != 0)
} else if (neg)
acc = -acc;
if (endptr != 0)
- *endptr = any ? s - 1 : (char *)nptr;
+ *endptr = any ?
(char *)
s - 1 : (char *)nptr;
return (acc);
}
return (acc);
}
diff --git
a/lib/libc/stdlib/strtouq.c
b/lib/libc/stdlib/strtouq.c
index
67fa68b
..
14e37e0
100644
(file)
--- a/
lib/libc/stdlib/strtouq.c
+++ b/
lib/libc/stdlib/strtouq.c
@@
-109,6
+109,6
@@
strtouq(nptr, endptr, base)
} else if (neg)
acc = -acc;
if (endptr != 0)
} else if (neg)
acc = -acc;
if (endptr != 0)
- *endptr = any ? s - 1 : (char *)nptr;
+ *endptr = any ?
(char *)
s - 1 : (char *)nptr;
return (acc);
}
return (acc);
}