mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-13 21:44:16 +00:00
Change how a few pointer are supplied to functions, removes warnings about breaking aliasing rules
darcs-hash:20060326112339-ac50b-eb135567f6a6183e5dbc310c093d2139ecc8fa4b.gz
This commit is contained in:
parent
7fd2ae4ffd
commit
53c95abfb2
2 changed files with 11 additions and 3 deletions
9
env.c
9
env.c
|
@ -820,14 +820,19 @@ void env_set( const wchar_t *key,
|
|||
static int try_remove( env_node_t *n,
|
||||
const wchar_t *key )
|
||||
{
|
||||
const void *old_key_void, *old_val_void;
|
||||
wchar_t *old_key, *old_val;
|
||||
if( n == 0 )
|
||||
return 0;
|
||||
|
||||
hash_remove( &n->env,
|
||||
key,
|
||||
(const void **)&old_key,
|
||||
(const void **)&old_val );
|
||||
&old_key_void,
|
||||
&old_val_void );
|
||||
|
||||
old_key = (wchar_t *)old_key_void;
|
||||
old_val = (wchar_t *)old_val_void;
|
||||
|
||||
if( old_key != 0 )
|
||||
{
|
||||
var_entry_t * v = (var_entry_t *)old_val;
|
||||
|
|
|
@ -195,14 +195,17 @@ int function_exists( const wchar_t *cmd )
|
|||
void function_remove( const wchar_t *name )
|
||||
{
|
||||
void *key;
|
||||
const void *dv;
|
||||
function_data_t *d;
|
||||
event_t ev;
|
||||
|
||||
hash_remove( &function,
|
||||
name,
|
||||
(const void **) &key,
|
||||
(const void **)&d );
|
||||
&dv );
|
||||
|
||||
d=(function_data_t *)dv;
|
||||
|
||||
if( !key )
|
||||
return;
|
||||
|
||||
|
|
Loading…
Reference in a new issue