Skip to content

Commit

Permalink
Fix printf format warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
babelouest committed Feb 18, 2024
1 parent 39794e5 commit ff0b0da
Show file tree
Hide file tree
Showing 14 changed files with 194 additions and 193 deletions.
8 changes: 4 additions & 4 deletions src/client/ldap.c
Original file line number Diff line number Diff line change
Expand Up @@ -840,11 +840,11 @@ static LDAPMod ** get_ldap_write_mod(json_t * j_params, json_t * j_client, int a
json_array_append_new(j_mod_value_free_array, json_integer(i));
}
} else {
y_log_message(Y_LOG_LEVEL_ERROR, "get_ldap_write_mod - Error allocating resources for mods[%d]->mod_values (%s)", json_string_value(json_object_get(j_format, "property")), i);
y_log_message(Y_LOG_LEVEL_ERROR, "get_ldap_write_mod - Error allocating resources for mods[%zu]->mod_values (%s)", i, json_string_value(json_object_get(j_format, "property")));
has_error = 1;
}
} else {
y_log_message(Y_LOG_LEVEL_ERROR, "get_ldap_write_mod - Error allocating resources for mods[%d] (%s)", json_string_value(json_object_get(j_format, "property")), i);
y_log_message(Y_LOG_LEVEL_ERROR, "get_ldap_write_mod - Error allocating resources for mods[%zu] (%s)", i, json_string_value(json_object_get(j_format, "property")));
has_error = 1;
}
} else if (json_object_get(json_object_get(json_object_get(j_params, "data-format"), field), "multiple") != json_true()) {
Expand Down Expand Up @@ -872,11 +872,11 @@ static LDAPMod ** get_ldap_write_mod(json_t * j_params, json_t * j_client, int a
}
mods[i]->mod_values[1] = NULL;
} else {
y_log_message(Y_LOG_LEVEL_ERROR, "get_ldap_write_mod - Error allocating resources for mods[%d]->mod_values (%s)", json_string_value(json_object_get(j_format, "property")), i);
y_log_message(Y_LOG_LEVEL_ERROR, "get_ldap_write_mod - Error allocating resources for mods[%zu]->mod_values (%s)", i, json_string_value(json_object_get(j_format, "property")));
has_error = 1;
}
} else {
y_log_message(Y_LOG_LEVEL_ERROR, "get_ldap_write_mod - Error allocating resources for mods[%d] (%s)", json_string_value(json_object_get(j_format, "property")), i);
y_log_message(Y_LOG_LEVEL_ERROR, "get_ldap_write_mod - Error allocating resources for mods[%zu] (%s)", i, json_string_value(json_object_get(j_format, "property")));
has_error = 1;
}
} else {
Expand Down
5 changes: 3 additions & 2 deletions src/misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,13 @@
* SOFTWARE.
*
*/
#include <string.h>
#include <ctype.h>
#include <time.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#include <arpa/inet.h>
#include <string.h>
#include <ctype.h>
#include <gnutls/gnutls.h>
#include <gnutls/crypto.h>
#include <nettle/pbkdf2.h>
Expand Down
10 changes: 5 additions & 5 deletions src/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ json_t * get_module_type_list(struct config_elements * config) {
"display_name", user_module->display_name,
"description", user_module->description));
} else {
y_log_message(Y_LOG_LEVEL_ERROR, "get_module_type_list - Error pointer_list_get_at for user module at index %d", i);
y_log_message(Y_LOG_LEVEL_ERROR, "get_module_type_list - Error pointer_list_get_at for user module at index %zu", i);
}
}
// Gathering user middleware modules
Expand All @@ -58,7 +58,7 @@ json_t * get_module_type_list(struct config_elements * config) {
"display_name", user_middleware_module->display_name,
"description", user_middleware_module->description));
} else {
y_log_message(Y_LOG_LEVEL_ERROR, "get_module_type_list - Error pointer_list_get_at for user_middleware module at index %d", i);
y_log_message(Y_LOG_LEVEL_ERROR, "get_module_type_list - Error pointer_list_get_at for user_middleware module at index %zu", i);
}
}
// Gathering client modules
Expand All @@ -70,7 +70,7 @@ json_t * get_module_type_list(struct config_elements * config) {
"display_name", client_module->display_name,
"description", client_module->description));
} else {
y_log_message(Y_LOG_LEVEL_ERROR, "get_module_type_list - Error pointer_list_get_at for client module at index %d", i);
y_log_message(Y_LOG_LEVEL_ERROR, "get_module_type_list - Error pointer_list_get_at for client module at index %zu", i);
}
}
// Gathering user auth scheme modules
Expand All @@ -82,7 +82,7 @@ json_t * get_module_type_list(struct config_elements * config) {
"display_name", scheme_module->display_name,
"description", scheme_module->description));
} else {
y_log_message(Y_LOG_LEVEL_ERROR, "get_module_type_list - Error pointer_list_get_at for user auth scheme module at index %d", i);
y_log_message(Y_LOG_LEVEL_ERROR, "get_module_type_list - Error pointer_list_get_at for user auth scheme module at index %zu", i);
}
}
// Gathering plugin modules
Expand All @@ -94,7 +94,7 @@ json_t * get_module_type_list(struct config_elements * config) {
"display_name", plugin_module->display_name,
"description", plugin_module->description));
} else {
y_log_message(Y_LOG_LEVEL_ERROR, "get_module_type_list - Error pointer_list_get_at for plugin module at index %d", i);
y_log_message(Y_LOG_LEVEL_ERROR, "get_module_type_list - Error pointer_list_get_at for plugin module at index %zu", i);
}
}
} else {
Expand Down
Loading

0 comments on commit ff0b0da

Please sign in to comment.