Feature #3018 » uninitialized_var.diff
| thread.c | ||
|---|---|---|
|
struct timeval *timeout)
|
||
|
{
|
||
|
int result, lerrno;
|
||
|
fd_set orig_read, orig_write, orig_except;
|
||
|
#if defined __GNUC__ && defined __x86_64__
|
||
|
#define FAKE_FD_ZERO(f) (*(int *)&(f)=0) /* suppress lots of warnings */
|
||
|
#else
|
||
|
#define FAKE_FD_ZERO(f) ((void)0)
|
||
|
#endif
|
||
|
fd_set UNINITIALIZED_VAR(orig_read);
|
||
|
fd_set UNINITIALIZED_VAR(orig_write);
|
||
|
fd_set UNINITIALIZED_VAR(orig_except);
|
||
|
#ifndef linux
|
||
|
double limit = 0;
|
||
| ... | ... | |
|
}
|
||
|
#endif
|
||
|
if (read) orig_read = *read; else FAKE_FD_ZERO(orig_read);
|
||
|
if (write) orig_write = *write; else FAKE_FD_ZERO(orig_write);
|
||
|
if (except) orig_except = *except; else FAKE_FD_ZERO(orig_except);
|
||
|
#undef FAKE_FD_ZERO
|
||
|
if (read) orig_read = *read;
|
||
|
if (write) orig_write = *write;
|
||
|
if (except) orig_except = *except;
|
||
|
retry:
|
||
|
lerrno = 0;
|
||
| vm_core.h | ||
|---|---|---|
|
#define UNLIKELY(x) (x)
|
||
|
#endif /* __GNUC__ >= 3 */
|
||
|
#if __GNUC__ >= 3
|
||
|
#define UNINITIALIZED_VAR(x) x = x
|
||
|
#else
|
||
|
#define UNINITIALIZED_VAR(x) x
|
||
|
#endif
|
||
|
typedef unsigned long rb_num_t;
|
||
|
/* iseq data type */
|
||