Skip to content

Commit

Permalink
Problem: integer truncation warnings on Windows
Browse files Browse the repository at this point in the history
Solution: fix code in PUT_NUMBER1
  • Loading branch information
hintjens committed Feb 18, 2016
1 parent e4e09ac commit 0432101
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/zproto_codec_c.gsl
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ struct _$(class.name)_t {

// Put a 1-byte number to the frame
#define PUT_NUMBER1(host) { \\
*(byte *) self->needle = (host); \\
*(byte *) self->needle = (byte) (host); \\
self->needle++; \\
}

Expand Down
2 changes: 1 addition & 1 deletion src/zproto_codec_c_v1.gsl
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ struct _$(class.name)_t {

// Put a 1-byte number to the frame
#define PUT_NUMBER1(host) { \\
*(byte *) self->needle = (host); \\
*(byte *) self->needle = (byte) (host); \\
self->needle++; \\
}

Expand Down

0 comments on commit 0432101

Please sign in to comment.