svn commit: trunk/uClibc/test: misc pthread signal string time
vapier at uclibc.org
vapier at uclibc.org
Mon Jan 29 03:18:59 UTC 2007
Author: vapier
Date: 2007-01-28 19:18:59 -0800 (Sun, 28 Jan 2007)
New Revision: 17617
Log:
fixup shadowed warnings
Modified:
trunk/uClibc/test/misc/tst-seekdir.c
trunk/uClibc/test/pthread/ex7.c
trunk/uClibc/test/signal/sigchld.c
trunk/uClibc/test/string/tester.c
trunk/uClibc/test/time/clocktest.c
trunk/uClibc/test/time/test_time.c
Changeset:
Modified: trunk/uClibc/test/misc/tst-seekdir.c
===================================================================
--- trunk/uClibc/test/misc/tst-seekdir.c 2007-01-29 03:06:31 UTC (rev 17616)
+++ trunk/uClibc/test/misc/tst-seekdir.c 2007-01-29 03:18:59 UTC (rev 17617)
@@ -13,8 +13,7 @@
int i = 0;
int result = 0;
struct dirent *dp;
- long int save0;
- long int rewind;
+ off_t save0, rewind_ret;
dirp = opendir (".");
if (dirp == NULL)
@@ -63,13 +62,13 @@
/* Check rewinddir */
rewinddir (dirp);
- rewind = telldir (dirp);
- if (rewind == -1)
+ rewind_ret = telldir (dirp);
+ if (rewind_ret == -1)
{
printf ("telldir failed: %s\n", strerror(errno));
result = 1;
}
- else if (save0 != rewind)
+ else if (save0 != rewind_ret)
{
printf ("rewinddir didn't reset directory stream\n");
result = 1;
Modified: trunk/uClibc/test/pthread/ex7.c
===================================================================
--- trunk/uClibc/test/pthread/ex7.c 2007-01-29 03:06:31 UTC (rev 17616)
+++ trunk/uClibc/test/pthread/ex7.c 2007-01-29 03:18:59 UTC (rev 17617)
@@ -27,7 +27,7 @@
{
unsigned long status = 0;
event_t foo;
- struct timespec time;
+ struct timespec timeout;
struct timeval now;
long ms = (long) ms_param;
@@ -39,13 +39,13 @@
/* set the time out value */
printf("waiting %ld ms ...\n", ms);
gettimeofday(&now, NULL);
- time.tv_sec = now.tv_sec + ms/1000 + (now.tv_usec + (ms%1000)*1000)/1000000;
- time.tv_nsec = ((now.tv_usec + (ms%1000)*1000) % 1000000) * 1000;
+ timeout.tv_sec = now.tv_sec + ms/1000 + (now.tv_usec + (ms%1000)*1000)/1000000;
+ timeout.tv_nsec = ((now.tv_usec + (ms%1000)*1000) % 1000000) * 1000;
/* Just use this to test the time out. The cond var is never signaled. */
pthread_mutex_lock(&foo.mutex);
while (foo.flag == 0 && status != ETIMEDOUT) {
- status = pthread_cond_timedwait(&foo.cond, &foo.mutex, &time);
+ status = pthread_cond_timedwait(&foo.cond, &foo.mutex, &timeout);
}
pthread_mutex_unlock(&foo.mutex);
Modified: trunk/uClibc/test/signal/sigchld.c
===================================================================
--- trunk/uClibc/test/signal/sigchld.c 2007-01-29 03:06:31 UTC (rev 17616)
+++ trunk/uClibc/test/signal/sigchld.c 2007-01-29 03:18:59 UTC (rev 17617)
@@ -19,12 +19,12 @@
{
pid_t mypid;
struct sigaction siga;
- static sigset_t sigset;
+ static sigset_t set;
/* Set up sighandling */
- sigfillset(&sigset);
+ sigfillset(&set);
siga.sa_handler = test_handler;
- siga.sa_mask = sigset;
+ siga.sa_mask = set;
siga.sa_flags = 0;
if (sigaction(SIGCHLD, &siga, (struct sigaction *)NULL) != 0) {
fprintf(stderr, "sigaction choked: %s!", strerror(errno));
Modified: trunk/uClibc/test/string/tester.c
===================================================================
--- trunk/uClibc/test/string/tester.c 2007-01-29 03:06:31 UTC (rev 17616)
+++ trunk/uClibc/test/string/tester.c 2007-01-29 03:18:59 UTC (rev 17617)
@@ -126,7 +126,6 @@
#define SIMPLE_COPY(fn, n, str, ntest) \
do { \
int __n; \
- char *cp; \
for (__n = 0; __n < (int) sizeof (one); ++__n) \
one[__n] = 'Z'; \
fn (one, str); \
Modified: trunk/uClibc/test/time/clocktest.c
===================================================================
--- trunk/uClibc/test/time/clocktest.c 2007-01-29 03:06:31 UTC (rev 17616)
+++ trunk/uClibc/test/time/clocktest.c 2007-01-29 03:18:59 UTC (rev 17617)
@@ -7,7 +7,7 @@
volatile int gotit = 0;
static void
-alarm_handler (int signal)
+alarm_handler (int signum)
{
gotit = 1;
}
Modified: trunk/uClibc/test/time/test_time.c
===================================================================
--- trunk/uClibc/test/time/test_time.c 2007-01-29 03:06:31 UTC (rev 17616)
+++ trunk/uClibc/test/time/test_time.c 2007-01-29 03:18:59 UTC (rev 17617)
@@ -37,15 +37,15 @@
char buf[BUFSIZ];
if (argc > 0)
{
- static char buf[BUFSIZ];
- sprintf(buf, "TZ=%s", *argv);
- if (putenv(buf))
+ static char tzenvbuf[BUFSIZ];
+ sprintf(tzenvbuf, "TZ=%s", *argv);
+ if (putenv(tzenvbuf))
{
puts("putenv failed.");
lose = 1;
}
else
- puts (buf);
+ puts (tzenvbuf);
}
tzset();
tbuf.tm_year = 72;
More information about the uClibc-cvs
mailing list