Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #3436 from carenas/pedantic-main
pedantic main
  • Loading branch information
dscho committed Oct 13, 2021
2 parents aaec11d + 8e4b4ce commit e9b4cc4
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion compat/mingw.c
Expand Up @@ -333,7 +333,7 @@ static const wchar_t *make_relative_to(const wchar_t *path,

len = wcslen(path);
if (i + len + 1 > size) {
error("Could not make '%S' relative to '%S' (too large)",
error("Could not make '%ls' relative to '%ls' (too large)",
path, relative_to);
return NULL;
}
Expand Down
3 changes: 3 additions & 0 deletions compat/win32/dirent.c
@@ -1,11 +1,14 @@
#include "../../git-compat-util.h"

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpedantic"
typedef struct dirent_DIR {
struct DIR base_dir; /* extend base struct DIR */
HANDLE dd_handle; /* FindFirstFile handle */
int dd_stat; /* 0-based index */
struct dirent dd_dir; /* includes d_type */
} dirent_DIR;
#pragma GCC diagnostic pop

DIR *(*opendir)(const char *dirname) = dirent_opendir;

Expand Down
3 changes: 3 additions & 0 deletions compat/win32/fscache.c
Expand Up @@ -38,6 +38,8 @@ static struct trace_key trace_fscache = TRACE_KEY_INIT(FSCACHE);
* An entry in the file system cache. Used for both entire directory listings
* and file entries.
*/
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpedantic"
struct fsentry {
struct hashmap_entry ent;
mode_t st_mode;
Expand Down Expand Up @@ -70,6 +72,7 @@ struct fsentry {
*/
struct dirent dirent;
};
#pragma GCC diagnostic pop

struct heap_fsentry {
struct fsentry ent;
Expand Down
11 changes: 7 additions & 4 deletions mem-pool.c
Expand Up @@ -44,16 +44,19 @@ void mem_pool_init(struct mem_pool *pool, size_t initial_size)
if (initial_size > 0)
mem_pool_alloc_block(pool, initial_size, NULL);

trace_printf_key(&trace_mem_pool, "mem_pool (%p): init (%"PRIuMAX") initial size\n",
pool, (uintmax_t)initial_size);
trace_printf_key(&trace_mem_pool,
"mem_pool (%p): init (%"PRIuMAX") initial size\n",
(void *)pool, (uintmax_t)initial_size);
}

void mem_pool_discard(struct mem_pool *pool, int invalidate_memory)
{
struct mp_block *block, *block_to_free;

trace_printf_key(&trace_mem_pool, "mem_pool (%p): discard (%"PRIuMAX") unused\n",
pool, (uintmax_t)(pool->mp_block->end - pool->mp_block->next_free));
trace_printf_key(&trace_mem_pool,
"mem_pool (%p): discard (%"PRIuMAX") unused\n",
(void *)pool,
(uintmax_t)(pool->mp_block->end - pool->mp_block->next_free));
block = pool->mp_block;
while (block)
{
Expand Down

0 comments on commit e9b4cc4

Please sign in to comment.