Skip to content

Commit

Permalink
Refactor: remove different signedness warning from Pelles C
Browse files Browse the repository at this point in the history
  • Loading branch information
positively-charged committed Jun 25, 2017
1 parent d1c3382 commit 80aedb7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/parse/token/source.c
Original file line number Diff line number Diff line change
Expand Up @@ -2551,7 +2551,7 @@ static char read_ch( struct parse* parse ) {
enum { LOOKAHEAD_AMOUNT = 3 };
enum { SAFE_AMOUNT = SOURCE_BUFFER_SIZE - LOOKAHEAD_AMOUNT };
if ( source->buffer_pos >= SAFE_AMOUNT ) {
int unread = SOURCE_BUFFER_SIZE - source->buffer_pos;
size_t unread = SOURCE_BUFFER_SIZE - source->buffer_pos;
memcpy( source->buffer, source->buffer + source->buffer_pos, unread );
size_t count = fread( source->buffer + unread,
sizeof( source->buffer[ 0 ] ), SOURCE_BUFFER_SIZE - unread,
Expand Down
2 changes: 1 addition & 1 deletion src/task.c
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,7 @@ struct text_buffer* t_get_text_buffer( struct task* task,
buffer->prev = task->text_buffer;
enum { INITIAL_SIZE = 1 << 15 };
unsigned int size = INITIAL_SIZE;
while ( size < min_free_size ) {
while ( size < ( unsigned int ) min_free_size ) {
size <<= 1;
}
buffer->start = mem_alloc( sizeof( char ) * size );
Expand Down

0 comments on commit 80aedb7

Please sign in to comment.