Message ID | cover.1717073346.git.ps@pks.im (mailing list archive) |
---|---|
Headers | show |
Series | Compile with `-Wwrite-strings` | expand |
Patrick Steinhardt <ps@pks.im> writes: > @@ reftable/readwrite_test.c: static void test_write_key_order(void) > + struct strbuf buf = STRBUF_INIT; > + struct reftable_writer *w = > reftable_new_writer(&strbuf_add_void, &noop_flush, &buf, &opts); > ++ char a[] = "a", b[] = "b", target[] = "target"; So you decided to go in the complete opposite direction, hmph... I was hoping that we do not add more "writable" pieces of memory like target[] only to please the constness-strict compilers.
On Fri, May 31, 2024 at 02:13:27AM -0700, Junio C Hamano wrote: > Patrick Steinhardt <ps@pks.im> writes: > > > @@ reftable/readwrite_test.c: static void test_write_key_order(void) > > + struct strbuf buf = STRBUF_INIT; > > + struct reftable_writer *w = > > reftable_new_writer(&strbuf_add_void, &noop_flush, &buf, &opts); > > ++ char a[] = "a", b[] = "b", target[] = "target"; > > So you decided to go in the complete opposite direction, hmph... > > I was hoping that we do not add more "writable" pieces of memory > like target[] only to please the constness-strict compilers. I guess I misunderstood what you were saying. I'll revise this to go into the other direction. Patrick