Take the correct char type in growbuf_append()
This change removes all warnings (-Wall) from this function.
This commit is contained in:
2
indep.c
2
indep.c
@@ -821,7 +821,7 @@ growbuf_reserve(struct growbuf *gb, int leastarea)
|
||||
}
|
||||
|
||||
void
|
||||
growbuf_append(struct growbuf *gb, const char *src, int len)
|
||||
growbuf_append(struct growbuf *gb, const unsigned char *src, int len)
|
||||
{
|
||||
growbuf_reserve(gb, gb->length + len);
|
||||
memcpy(&gb->ptr[gb->length], src, len);
|
||||
|
2
indep.h
2
indep.h
@@ -83,7 +83,7 @@ extern void growbuf_init_without_GC(struct growbuf *gb);
|
||||
extern void growbuf_clear(struct growbuf *gb);
|
||||
extern Str growbuf_to_Str(struct growbuf *gb);
|
||||
extern void growbuf_reserve(struct growbuf *gb, int leastarea);
|
||||
extern void growbuf_append(struct growbuf *gb, const char *src, int len);
|
||||
extern void growbuf_append(struct growbuf *gb, const unsigned char *src, int len);
|
||||
#define GROWBUF_ADD_CHAR(gb,ch) ((((gb)->length>=(gb)->area_size)?growbuf_reserve(gb,(gb)->length+1):(void)0),(void)((gb)->ptr[(gb)->length++] = (ch)))
|
||||
|
||||
extern char *w3m_auxbin_dir();
|
||||
|
Reference in New Issue
Block a user