o Include <string.h>

o  Make this ILP32/LP64 clean: cast pointers to long.
This commit is contained in:
Marcel Moolenaar 2005-11-19 04:45:15 +00:00
parent 40edb45e59
commit dc2e8ca41b
2 changed files with 10 additions and 6 deletions

View File

@ -34,6 +34,7 @@
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <limits.h>
#include <pthread.h>
@ -69,9 +70,10 @@ recurse(void *args)
* hand tweaking, so just print a warning rather than aborting.
*/
if (parms->top - (void *)&top != FRAME_SIZE * parms->cur) {
fprintf(stderr, "Stack size (%d) != expected (%d), frame %d\n",
parms->top - (void *)&top, FRAME_SIZE * parms->cur,
parms->cur);
fprintf(stderr,
"Stack size (%ld) != expected (%ld), frame %ld\n",
(long)parms->top - (long)&top,
(long)(FRAME_SIZE * parms->cur), (long)parms->cur);
}
parms->cur++;

View File

@ -34,6 +34,7 @@
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <limits.h>
#include <pthread.h>
@ -69,9 +70,10 @@ recurse(void *args)
* hand tweaking, so just print a warning rather than aborting.
*/
if (parms->top - (void *)&top != FRAME_SIZE * parms->cur) {
fprintf(stderr, "Stack size (%d) != expected (%d), frame %d\n",
parms->top - (void *)&top, FRAME_SIZE * parms->cur,
parms->cur);
fprintf(stderr,
"Stack size (%ld) != expected (%ld), frame %ld\n",
(long)parms->top - (long)&top,
(long)(FRAME_SIZE * parms->cur), (long)parms->cur);
}
parms->cur++;