mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-18 13:54:36 -05:00
[helper] Fix type issue with variadic function.
* https://www.securecoding.cert.org/confluence/display/c/DCL11-C.+Understand+the+type+issues+associated+with+variadic+functions
This commit is contained in:
parent
3061980741
commit
a3c1ff7d94
4 changed files with 8 additions and 8 deletions
|
@ -79,7 +79,7 @@ static int execshssh ( const char *host )
|
|||
char **args = NULL;
|
||||
int argsv = 0;
|
||||
|
||||
helper_parse_setup ( config.ssh_command, &args, &argsv, "{host}", host, NULL );
|
||||
helper_parse_setup ( config.ssh_command, &args, &argsv, "{host}", host, (char *) 0 );
|
||||
|
||||
gsize l = strlen ( "Connecting to '' via rofi" ) + strlen ( host ) + 1;
|
||||
gchar *desc = g_newa ( gchar, l );
|
||||
|
|
|
@ -546,7 +546,7 @@ static inline int act_on_window ( xcb_window_t window )
|
|||
|
||||
g_snprintf ( window_regex, sizeof window_regex, "%d", window );
|
||||
|
||||
helper_parse_setup ( config.window_command, &args, &argc, "{window}", window_regex, NULL );
|
||||
helper_parse_setup ( config.window_command, &args, &argc, "{window}", window_regex, (char *) 0 );
|
||||
|
||||
GError *error = NULL;
|
||||
g_spawn_async ( NULL, args, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, &error );
|
||||
|
|
|
@ -117,11 +117,11 @@ int helper_parse_setup ( char * string, char ***output, int *length, ... )
|
|||
va_start ( ap, length );
|
||||
while ( 1 ) {
|
||||
char * key = va_arg ( ap, char * );
|
||||
if ( key == NULL ) {
|
||||
if ( key == (char *) 0 ) {
|
||||
break;
|
||||
}
|
||||
char *value = va_arg ( ap, char * );
|
||||
if ( value == NULL ) {
|
||||
if ( value == (char *) 0 ) {
|
||||
break;
|
||||
}
|
||||
g_hash_table_insert ( h, key, value );
|
||||
|
@ -476,7 +476,7 @@ int execute_generator ( const char * cmd )
|
|||
{
|
||||
char **args = NULL;
|
||||
int argv = 0;
|
||||
helper_parse_setup ( config.run_command, &args, &argv, "{cmd}", cmd, NULL );
|
||||
helper_parse_setup ( config.run_command, &args, &argv, "{cmd}", cmd, (char *) 0 );
|
||||
|
||||
int fd = -1;
|
||||
GError *error = NULL;
|
||||
|
@ -994,10 +994,10 @@ gboolean helper_execute_command ( const char *wd, const char *cmd, gboolean run_
|
|||
int argc = 0;
|
||||
|
||||
if ( run_in_term ) {
|
||||
helper_parse_setup ( config.run_shell_command, &args, &argc, "{cmd}", cmd, NULL );
|
||||
helper_parse_setup ( config.run_shell_command, &args, &argc, "{cmd}", cmd, (char *) 0 );
|
||||
}
|
||||
else {
|
||||
helper_parse_setup ( config.run_command, &args, &argc, "{cmd}", cmd, NULL );
|
||||
helper_parse_setup ( config.run_command, &args, &argc, "{cmd}", cmd, (char *) 0 );
|
||||
}
|
||||
|
||||
if ( context != NULL ) {
|
||||
|
|
|
@ -311,7 +311,7 @@ static void rofi_view_calculate_window_position ( RofiViewState *state )
|
|||
state->x = CacheState.mon.x;
|
||||
break;
|
||||
case WL_CENTER:
|
||||
;__attribute__ ( ( fallthrough ) );
|
||||
; __attribute__ ( ( fallthrough ) );
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue