]> granicus.if.org Git - graphviz/commitdiff
remove some unnecessary void* casts
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 11 Feb 2021 04:55:55 +0000 (20:55 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 17 Feb 2021 15:38:55 +0000 (07:38 -0800)
lib/expr/exgram.h
lib/expr/exparse.y
lib/vmalloc/vmalloc.h

index dd73052dcaa6226c732b0ec27ad453023e220bd8..ee2b12d554045117a5c8bf972ae9c118e9cde077 100644 (file)
@@ -35,7 +35,7 @@ extern "C" {
 
 #define exlex()                extoken_fn(expr.program)
 
-#define ALLOCATE(p,x)  (x*)exalloc(p,sizeof(x))
+#define ALLOCATE(p,x)  exalloc(p,sizeof(x))
 #define QUALIFY(r,s)   ((r)&&(expr.program->disc->flags&EX_QUALIFY)?qualify(r,s):(s))
 
 static int             a2t[] = { 0, FLOATING, INTEGER, STRING };
index 45baa55859779cd9a18bf35caf5d709c6955330f..dc6b0d0b97ad6a7f5a41c3699371056311999a8e 100644 (file)
@@ -452,7 +452,7 @@ switch_item :       case_list statement_list
                                sw->lastcase = $$;
                                n = sw->cur - sw->base;
                                sw->cur = sw->base;
-                               $$->data.select.constant = (Extype_t**)exalloc(expr.program, (n + 1) * sizeof(Extype_t*));
+                               $$->data.select.constant = exalloc(expr.program, (n + 1) * sizeof(Extype_t*));
                                memcpy($$->data.select.constant, sw->base, n * sizeof(Extype_t*));
                                $$->data.select.constant[n] = 0;
                        }
index 7d1f121752b54423f7066731f8084c5579d9ed31..f8b6645d3127e33d596a57f79f89b33f3dea0eb3 100644 (file)
@@ -62,7 +62,7 @@ extern "C" {
 #ifndef vmfree
 #define vmfree(vm,d)           (*(_VM_(vm)->meth.freef))((vm),(void*)(d))
 #endif
-#define vmnewof(v,p,t,n,x)     (t*)vmresize((v), (p), sizeof(t)*(n)+(x))
+#define vmnewof(v,p,t,n,x)     vmresize((v), (p), sizeof(t)*(n)+(x))
 #ifdef __cplusplus
 }
 #endif