Skip to content

Commit

Permalink
Warnings de formato (#154)
Browse files Browse the repository at this point in the history
* refactor: Warning de formato
espera char*, pero argumento es void*

* refactor: warning de formato
espera int, pero argumento es long
  • Loading branch information
tomasanchez authored Mar 22, 2022
1 parent f021197 commit 1136796
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/commons/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ int config_save_in_file(t_config *self, char* path) {

char* lines = string_new();
void add_line(char* key, void* value) {
string_append_with_format(&lines, "%s=%s\n", key, value);
string_append_with_format(&lines, "%s=%s\n", key, (char *) value);
}

dictionary_iterator(self->properties, add_line);
Expand Down
2 changes: 1 addition & 1 deletion src/commons/temporal.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ char *temporal_get_string_time(const char* format) {
if(clock_gettime(CLOCK_REALTIME, log_timespec) == -1) {
return NULL;
}
milisec = string_from_format("%03d", log_timespec->tv_nsec / 1000000);
milisec = string_from_format("%03ld", log_timespec->tv_nsec / 1000000);

for(char* ms = strstr(str_time, "%MS"); ms != NULL; ms = strstr(ms + 3, "%MS")) {
memcpy(ms, milisec, 3);
Expand Down

0 comments on commit 1136796

Please sign in to comment.