}
// will be invoked from gdb.
+static void whoami(char *msg) __attribute__((unused));
static void whoami(char *msg)
{
fprintf(stderr, "pid %d Thread %d %s\n", getpid(), gettid(), msg);
char *threads_spec;
pthread_t ebbr, egll, zzzz;
struct spec b, l, p, m;
- char *some_mem = malloc(100);
+ char *some_mem __attribute__((unused)) = malloc(100);
setaffinity();
if (argc > 1)
static int sleeps = 15;
static void make_error (char *s)
{
- char *make_error_name = "make_error name";
- char c;
- double pi2 = 2.0 * pi;
+ char *make_error_name __attribute__((unused)) = "make_error name";
+ char c __attribute__((unused));
+ double pi2 __attribute__((unused)) = 2.0 * pi;
whoami(s);
if (int_und == 0)
printf ("%s int_und is zero %d\n", s, int_und);
static void level ()
{
- char *level_name = "level name";
+ char *level_name __attribute__((unused)) = "level name";
make_error ("called from level");
}
int i, j;
for (i = 0; i < LOOPS; i++)
for (j = 0; i < LOOPS; i++)
- *loopnr++;
+ (*loopnr)++;
}
static void *brussels_fn(void *v)
{
- char *brussels_name = "Brussels";
+ char *brussels_name __attribute__((unused)) = "Brussels";
make_error ("called from Brussels");
loopt1 = 1;
while (! (loopt1 && loopt2 && loopmain))
}
static void *london_fn(void *v)
{
- char *london_name = "London";
+ char *london_name __attribute__((unused)) = "London";
make_error ("called from London");
loopt2 = 1;
while (! (loopt1 && loopt2 && loopmain))
}
static void *petaouchnok_fn(void *v)
{
- char *petaouchnok_name = "Petaouchnok";
+ char *petaouchnok_name __attribute__((unused)) = "Petaouchnok";
struct timeval t;
int i;
for (i = 1; i <= sleeps; i++) {
}
int main (int argc, char *argv[])
{
- char *main_name = "main name";
+ char *main_name __attribute__((unused)) = "main name";
pthread_t ebbr, egll, zzzz;
int i = 1234;
char undef = '?';
- char *some_mem = malloc(100);
+ char *some_mem __attribute__((unused)) = malloc(100);
VALGRIND_MAKE_MEM_UNDEFINED(&undef, 1);
int len = strlen(undefined);
breakme(__LINE__); //break1