summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
47e0f2e)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
#include <assert.h>
#include <glib.h>
#include <errno.h>
#include <assert.h>
#include <glib.h>
#include <errno.h>
#include <babeltrace/list.h>
#include "ctf-scanner.h"
#include "ctf-parser.h"
#include <babeltrace/list.h>
#include "ctf-scanner.h"
#include "ctf-parser.h"
- ret = (int) g_hash_table_lookup(s->types, id);
+ ret = (int) (long) g_hash_table_lookup(s->types, id);
printf_dbg("lookup %p %s %d\n", s, id, ret);
return ret;
}
printf_dbg("lookup %p %s %d\n", s, id, ret);
return ret;
}
{
$$ = make_node(scanner, NODE_UNARY_EXPRESSION);
$$->u.unary_expression.type = UNARY_UNSIGNED_CONSTANT;
{
$$ = make_node(scanner, NODE_UNARY_EXPRESSION);
$$->u.unary_expression.type = UNARY_UNSIGNED_CONSTANT;
- sscanf(yylval.gs->s, "%llu",
+ sscanf(yylval.gs->s, "%" PRIu64,
&$$->u.unary_expression.u.unsigned_constant);
}
| OCTAL_CONSTANT
{
$$ = make_node(scanner, NODE_UNARY_EXPRESSION);
$$->u.unary_expression.type = UNARY_UNSIGNED_CONSTANT;
&$$->u.unary_expression.u.unsigned_constant);
}
| OCTAL_CONSTANT
{
$$ = make_node(scanner, NODE_UNARY_EXPRESSION);
$$->u.unary_expression.type = UNARY_UNSIGNED_CONSTANT;
- sscanf(yylval.gs->s, "0%llo",
+ sscanf(yylval.gs->s, "0%" PRIo64,
&$$->u.unary_expression.u.unsigned_constant);
}
| HEXADECIMAL_CONSTANT
{
$$ = make_node(scanner, NODE_UNARY_EXPRESSION);
$$->u.unary_expression.type = UNARY_UNSIGNED_CONSTANT;
&$$->u.unary_expression.u.unsigned_constant);
}
| HEXADECIMAL_CONSTANT
{
$$ = make_node(scanner, NODE_UNARY_EXPRESSION);
$$->u.unary_expression.type = UNARY_UNSIGNED_CONSTANT;
- sscanf(yylval.gs->s, "0x%llx",
+ sscanf(yylval.gs->s, "0x%" PRIx64,
&$$->u.unary_expression.u.unsigned_constant);
}
| STRING_LITERAL_START DQUOTE
&$$->u.unary_expression.u.unsigned_constant);
}
| STRING_LITERAL_START DQUOTE
{
$$ = make_node(scanner, NODE_UNARY_EXPRESSION);
$$->u.unary_expression.type = UNARY_UNSIGNED_CONSTANT;
{
$$ = make_node(scanner, NODE_UNARY_EXPRESSION);
$$->u.unary_expression.type = UNARY_UNSIGNED_CONSTANT;
- sscanf(yylval.gs->s, "%llu",
+ sscanf(yylval.gs->s, "%" PRIu64,
&$$->u.unary_expression.u.unsigned_constant);
}
| OCTAL_CONSTANT
{
$$ = make_node(scanner, NODE_UNARY_EXPRESSION);
$$->u.unary_expression.type = UNARY_UNSIGNED_CONSTANT;
&$$->u.unary_expression.u.unsigned_constant);
}
| OCTAL_CONSTANT
{
$$ = make_node(scanner, NODE_UNARY_EXPRESSION);
$$->u.unary_expression.type = UNARY_UNSIGNED_CONSTANT;
- sscanf(yylval.gs->s, "0%llo",
+ sscanf(yylval.gs->s, "0%" PRIo64,
&$$->u.unary_expression.u.unsigned_constant);
}
| HEXADECIMAL_CONSTANT
{
$$ = make_node(scanner, NODE_UNARY_EXPRESSION);
$$->u.unary_expression.type = UNARY_UNSIGNED_CONSTANT;
&$$->u.unary_expression.u.unsigned_constant);
}
| HEXADECIMAL_CONSTANT
{
$$ = make_node(scanner, NODE_UNARY_EXPRESSION);
$$->u.unary_expression.type = UNARY_UNSIGNED_CONSTANT;
- sscanf(yylval.gs->s, "0x%llx",
+ sscanf(yylval.gs->s, "0x%" PRIx64,
&$$->u.unary_expression.u.unsigned_constant);
}
;
&$$->u.unary_expression.u.unsigned_constant);
}
;
#include <stdlib.h>
#include <assert.h>
#include <glib.h>
#include <stdlib.h>
#include <assert.h>
#include <glib.h>
#include <errno.h>
#include <babeltrace/list.h>
#include "ctf-scanner.h"
#include <errno.h>
#include <babeltrace/list.h>
#include "ctf-scanner.h"
case UNARY_SIGNED_CONSTANT:
print_tabs(fd, depth);
fprintf(fd, "<unary_expression value=");
case UNARY_SIGNED_CONSTANT:
print_tabs(fd, depth);
fprintf(fd, "<unary_expression value=");
- fprintf(fd, "%lld", node->u.unary_expression.u.signed_constant);
+ fprintf(fd, "%" PRId64, node->u.unary_expression.u.signed_constant);
fprintf(fd, " />\n");
break;
case UNARY_UNSIGNED_CONSTANT:
print_tabs(fd, depth);
fprintf(fd, "<unary_expression value=");
fprintf(fd, " />\n");
break;
case UNARY_UNSIGNED_CONSTANT:
print_tabs(fd, depth);
fprintf(fd, "<unary_expression value=");
- fprintf(fd, "%llu", node->u.unary_expression.u.signed_constant);
+ fprintf(fd, "%" PRIu64, node->u.unary_expression.u.signed_constant);
fprintf(fd, " />\n");
break;
case UNARY_SBRAC:
fprintf(fd, " />\n");
break;
case UNARY_SBRAC:
unsigned long l[TEST_LEN/sizeof(unsigned long)];
unsigned long long ll[TEST_LEN/sizeof(unsigned long long)];
} target;
unsigned long l[TEST_LEN/sizeof(unsigned long)];
unsigned long long ll[TEST_LEN/sizeof(unsigned long long)];
} target;
+ unsigned long long readval;
unsigned int s, l;
int err = 0;
unsigned int s, l;
int err = 0;
long l[TEST_LEN/sizeof(long)];
long long ll[TEST_LEN/sizeof(long long)];
} target;
long l[TEST_LEN/sizeof(long)];
long long ll[TEST_LEN/sizeof(long long)];
} target;
unsigned int s, l;
int err = 0;
unsigned int s, l;
int err = 0;
unsigned long l[2];
unsigned long long ll[1];
} target;
unsigned long l[2];
unsigned long long ll[1];
} target;
+ unsigned long long readval;
if (argc > 1)
src = atoi(argv[1]);
if (argc > 1)
src = atoi(argv[1]);
g_array_set_size(array, 1);
g_array_index(array, GQuark, array->len - 1) = q;
g_hash_table_insert(enum_class->table.value_to_quark_set,
g_array_set_size(array, 1);
g_array_index(array, GQuark, array->len - 1) = q;
g_hash_table_insert(enum_class->table.value_to_quark_set,
- (gconstpointer) v, array);
} else {
g_array_set_size(array, array->len + 1);
g_array_index(array, GQuark, array->len - 1) = q;
} else {
g_array_set_size(array, array->len + 1);
g_array_index(array, GQuark, array->len - 1) = q;
g_array_set_size(array, 1);
g_array_index(array, GQuark, array->len - 1) = q;
g_hash_table_insert(enum_class->table.value_to_quark_set,
g_array_set_size(array, 1);
g_array_index(array, GQuark, array->len - 1) = q;
g_hash_table_insert(enum_class->table.value_to_quark_set,
- (gconstpointer) v, array);
} else {
g_array_set_size(array, array->len + 1);
g_array_index(array, GQuark, array->len - 1) = q;
} else {
g_array_set_size(array, array->len + 1);
g_array_index(array, GQuark, array->len - 1) = q;