• Ondřej Surý's avatar
    Add semantic patch to find void f() { ... return ((void)g())); ... } · 9dfa3305
    Ondřej Surý authored
    When a function returns void, it can be used as an argument to return in
    function returning also void, e.g.:
    
    void in(void) {
      return;
    }
    
    void out(void) {
      return (in());
    }
    
    while this is legal, it should be rewritten as:
    
    void out(void) {
      in();
      return;
    }
    
    The semantic patch just find the occurrences, and they need to be fixed
    by hand.
    9dfa3305
Name
Last commit
Last update
..
.gitignore Loading commit data...
config-h.spatch Loading commit data...
dns_name_copy-with-result.spatch Loading commit data...
dns_name_copy.spatch Loading commit data...
dns_name_copynf.spatch Loading commit data...
dns_name_dup.disabled Loading commit data...
dns_rbtnodechain_init.disabled Loading commit data...
isc_event_allocat_never_fail.spatch Loading commit data...
isc_mem_allocate_never_fail.spatch Loading commit data...
isc_mem_create_never_fail.disabled Loading commit data...
isc_mem_get_never_fail.spatch Loading commit data...
isc_mem_putanddetach.spatch Loading commit data...
isc_mem_strdup_never_fail.spatch Loading commit data...
memcpy.spatch Loading commit data...
return-void-from-void.spatch Loading commit data...
unreachable.spatch Loading commit data...