Fix some clang compiler warnings

This commit is contained in:
Dave Davenport 2017-05-11 18:30:44 +02:00
parent 76244fedc0
commit 67e38cde40
3 changed files with 6 additions and 6 deletions

View File

@ -298,7 +298,7 @@ static void parse_ssh_config_file ( const char *filename, char ***retv, unsigned
else {
full_path = g_strdup ( path );
}
glob_t globbuf = { 0, };
glob_t globbuf = { .gl_pathc = 0, .gl_pathv = NULL, .gl_offs = 0 };
if ( glob ( full_path, 0, NULL, &globbuf ) == 0 ) {
for ( size_t iter = 0; iter < globbuf.gl_pathc; iter++ ) {

View File

@ -639,7 +639,7 @@ void rofi_theme_convert_old ( void )
{
if ( config.color_window ) {
char **retv = g_strsplit ( config.color_window, ",", -1 );
const char const *conf[] = {
const char * const conf[] = {
"* { background: %s; }",
"* { bordercolor: %s; }",
"* { separatorcolor: %s; }"
@ -653,7 +653,7 @@ void rofi_theme_convert_old ( void )
}
if ( config.color_normal ) {
char **retv = g_strsplit ( config.color_normal, ",", -1 );
const char const *conf[] = {
const char * const conf[] = {
"* { normal-background: %s; }",
"* { foreground: %s; normal-foreground: @foreground; alternate-normal-foreground: @foreground; }",
"* { alternate-normal-background: %s; }",
@ -669,7 +669,7 @@ void rofi_theme_convert_old ( void )
}
if ( config.color_urgent ) {
char **retv = g_strsplit ( config.color_urgent, ",", -1 );
const char const *conf[] = {
const char * const conf[] = {
"* { urgent-background: %s; }",
"* { urgent-foreground: %s; alternate-urgent-foreground: @urgent-foreground;}",
"* { alternate-urgent-background: %s; }",
@ -685,7 +685,7 @@ void rofi_theme_convert_old ( void )
}
if ( config.color_active ) {
char **retv = g_strsplit ( config.color_active, ",", -1 );
const char const *conf[] = {
const char * const conf[] = {
"* { active-background: %s; }",
"* { active-foreground: %s; alternate-active-foreground: @active-foreground;}",
"* { alternate-active-background: %s; }",

View File

@ -173,7 +173,7 @@ textbox* textbox_create ( const char *name, TextboxFlags flags, TextBoxFontType
/**
* State names used for theming.
*/
const char const *const theme_prop_names[][3] = {
const char *const theme_prop_names[][3] = {
/** Normal row */
{ "normal.normal", "selected.normal", "alternate.normal" },
/** Urgent row */