aboutsummaryrefslogtreecommitdiffhomepage
path: root/uzbl.c
diff options
context:
space:
mode:
authorGravatar DuClare <akarinotengoku@gmail.com>2009-05-15 20:23:08 +0300
committerGravatar DuClare <akarinotengoku@gmail.com>2009-05-15 20:23:08 +0300
commit4293a258255849854670ce12de428581904a1a24 (patch)
tree49989218886ba0e120d427e014ff64bd019be0c3 /uzbl.c
parent0dd569f2475f9d3e6d58cb60b2db21ed479ce663 (diff)
Fix warnings caused by casts between ints and pointers on 64bit
Diffstat (limited to 'uzbl.c')
-rw-r--r--uzbl.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/uzbl.c b/uzbl.c
index ae8def0..abb01e1 100644
--- a/uzbl.c
+++ b/uzbl.c
@@ -107,7 +107,7 @@ const struct {
{ "SUPER", GDK_SUPER_MASK }, // super (since 2.10)
{ "HYPER", GDK_HYPER_MASK }, // hyper (since 2.10)
{ "META", GDK_META_MASK }, // meta (since 2.10)
- { NULL, NULL }
+ { NULL, 0 }
};
/* construct a hash from the var_name_to_ptr array for quick access */
@@ -579,8 +579,7 @@ setup_scanner() {
uzbl.scan = g_scanner_new(&scan_config);
while(symp->symbol_name) {
g_scanner_scope_add_symbol(uzbl.scan, 0,
- symp->symbol_name,
- GINT_TO_POINTER(symp->symbol_token));
+ symp->symbol_name, (gulong*)&(symp->symbol_token));
symp++;
}
}
@@ -592,14 +591,14 @@ expand_template(const char *template) {
GTokenType token = G_TOKEN_NONE;
GString *ret = g_string_new("");
char *buf=NULL;
- int sym;
+ gulong sym;
g_scanner_input_text(uzbl.scan, template, strlen(template));
while(!g_scanner_eof(uzbl.scan) && token != G_TOKEN_LAST) {
token = g_scanner_get_next_token(uzbl.scan);
if(token == G_TOKEN_SYMBOL) {
- sym = (int)g_scanner_cur_value(uzbl.scan).v_symbol;
+ sym = *((gulong*)g_scanner_cur_value(uzbl.scan).v_int);
switch(sym) {
case SYM_URI:
g_string_append(ret,
@@ -774,12 +773,12 @@ setup_regex() {
static gboolean
get_var_value(gchar *name) {
void **p = NULL;
-
+
if( (p = g_hash_table_lookup(uzbl.comm.proto_var, name)) ) {
if(var_is("status_format", name)
|| var_is("useragent", name)) {
printf("VAR: %s VALUE: %s\n", name, (char *)*p);
- } else printf("VAR: %s VALUE: %d\n", name, (int)*p);
+ } else printf("VAR: %s VALUE: %d\n", name, *((int *)p));
}
return TRUE;
}