Skip to content

Commit e9b4cc4

Browse files
authored
Merge pull request git-for-windows#3436 from carenas/pedantic-main
pedantic main
2 parents aaec11d + 8e4b4ce commit e9b4cc4

File tree

4 files changed

+14
-5
lines changed

4 files changed

+14
-5
lines changed

compat/mingw.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ static const wchar_t *make_relative_to(const wchar_t *path,
333333

334334
len = wcslen(path);
335335
if (i + len + 1 > size) {
336-
error("Could not make '%S' relative to '%S' (too large)",
336+
error("Could not make '%ls' relative to '%ls' (too large)",
337337
path, relative_to);
338338
return NULL;
339339
}

compat/win32/dirent.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
#include "../../git-compat-util.h"
22

3+
#pragma GCC diagnostic push
4+
#pragma GCC diagnostic ignored "-Wpedantic"
35
typedef struct dirent_DIR {
46
struct DIR base_dir; /* extend base struct DIR */
57
HANDLE dd_handle; /* FindFirstFile handle */
68
int dd_stat; /* 0-based index */
79
struct dirent dd_dir; /* includes d_type */
810
} dirent_DIR;
11+
#pragma GCC diagnostic pop
912

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

compat/win32/fscache.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ static struct trace_key trace_fscache = TRACE_KEY_INIT(FSCACHE);
3838
* An entry in the file system cache. Used for both entire directory listings
3939
* and file entries.
4040
*/
41+
#pragma GCC diagnostic push
42+
#pragma GCC diagnostic ignored "-Wpedantic"
4143
struct fsentry {
4244
struct hashmap_entry ent;
4345
mode_t st_mode;
@@ -70,6 +72,7 @@ struct fsentry {
7072
*/
7173
struct dirent dirent;
7274
};
75+
#pragma GCC diagnostic pop
7376

7477
struct heap_fsentry {
7578
struct fsentry ent;

mem-pool.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,19 @@ void mem_pool_init(struct mem_pool *pool, size_t initial_size)
4444
if (initial_size > 0)
4545
mem_pool_alloc_block(pool, initial_size, NULL);
4646

47-
trace_printf_key(&trace_mem_pool, "mem_pool (%p): init (%"PRIuMAX") initial size\n",
48-
pool, (uintmax_t)initial_size);
47+
trace_printf_key(&trace_mem_pool,
48+
"mem_pool (%p): init (%"PRIuMAX") initial size\n",
49+
(void *)pool, (uintmax_t)initial_size);
4950
}
5051

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

55-
trace_printf_key(&trace_mem_pool, "mem_pool (%p): discard (%"PRIuMAX") unused\n",
56-
pool, (uintmax_t)(pool->mp_block->end - pool->mp_block->next_free));
56+
trace_printf_key(&trace_mem_pool,
57+
"mem_pool (%p): discard (%"PRIuMAX") unused\n",
58+
(void *)pool,
59+
(uintmax_t)(pool->mp_block->end - pool->mp_block->next_free));
5760
block = pool->mp_block;
5861
while (block)
5962
{

0 commit comments

Comments
 (0)