Skip to content

Commit

Permalink
Fix warnings when building with clang on mac
Browse files Browse the repository at this point in the history
  • Loading branch information
glandium committed Mar 13, 2019
1 parent 37cf073 commit 5f0ae48
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion helper/cinnabar-fast-import.c
Expand Up @@ -885,7 +885,7 @@ static void for_each_changegroup_chunk(struct chunk_queue *queue, int version,
int cg2 = version == 2;
struct strbuf buf = STRBUF_INIT;
struct rev_chunk chunk = { STRBUF_INIT, };
struct hg_object_id delta_node = { hash : { 0, }};
struct hg_object_id delta_node = {{ 0, }};

while (get_chunk(queue, &buf), buf.len) {
rev_chunk_from_memory(&chunk, &buf, cg2 ? NULL : &delta_node);
Expand Down
2 changes: 1 addition & 1 deletion helper/hg-connect-stdio.c
Expand Up @@ -134,7 +134,7 @@ static void stdio_push_command(struct hg_connection *conn,
va_end(ap);

//TODO: chunk in smaller pieces.
strbuf_addf(&header, "%"PRIuMAX"\n", len);
strbuf_addf(&header, "%"PRIdMAX"\n", (intmax_t)len);
xwrite(conn->stdio.proc.in, header.buf, header.len);
strbuf_release(&header);

Expand Down
4 changes: 2 additions & 2 deletions helper/hg-data.c
Expand Up @@ -5,12 +5,12 @@
#include "cinnabar-fast-import.h"
#include "hg-data.h"

static const struct hg_object_id empty_hg_file = { hash: {
static const struct hg_object_id empty_hg_file = {{
0xb8, 0x0d, 0xe5, 0xd1, 0x38, 0x75, 0x85, 0x41, 0xc5, 0xf0,
0x52, 0x65, 0xad, 0x14, 0x4a, 0xb9, 0xfa, 0x86, 0xd1, 0xdb,
}};

const struct hg_object_id hg_null_oid = { hash: { 0, }};
const struct hg_object_id hg_null_oid = {{ 0, }};

int is_null_hg_oid(const struct hg_object_id *oid)
{
Expand Down

0 comments on commit 5f0ae48

Please sign in to comment.