aboutsummaryrefslogtreecommitdiff
path: root/src/sg_write_x.c
diff options
context:
space:
mode:
authorDouglas Gilbert <dgilbert@interlog.com>2017-12-30 00:53:28 +0000
committerDouglas Gilbert <dgilbert@interlog.com>2017-12-30 00:53:28 +0000
commitdb09526533daf4cd4886195a5f752fc35c399168 (patch)
tree3acef022e0419a2525b97cf96da4bd57bc36f1cc /src/sg_write_x.c
parentb29ef85867d5347e8fed4c603986964868cba801 (diff)
downloadsg3_utils-db09526533daf4cd4886195a5f752fc35c399168.tar.gz
minor cleanup (compile warnings) for Windows
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@739 6180dd3e-e324-4e3e-922d-17de1ae2f315
Diffstat (limited to 'src/sg_write_x.c')
-rw-r--r--src/sg_write_x.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/sg_write_x.c b/src/sg_write_x.c
index 4effbde1..d5381d52 100644
--- a/src/sg_write_x.c
+++ b/src/sg_write_x.c
@@ -36,7 +36,7 @@
#include "sg_unaligned.h"
#include "sg_pr2serr.h"
-static const char * version_str = "1.09 20171222";
+static const char * version_str = "1.10 20171229";
/* Protection Information refers to 8 bytes of extra information usually
* associated with each logical block and is often abbreviated to PI while
@@ -1506,7 +1506,7 @@ parse_cmd_line(struct opts_t *op, int argc, char *argv[],
break;
case 'a':
j = sg_get_num(optarg);
- if ((j < 0) || (j > UINT16_MAX)) {
+ if ((j < 0) || (j > (int)UINT16_MAX)) {
pr2serr("bad argument to '--app-tag='. Expect 0 to 0xffff "
"inclusive\n");
return SG_LIB_SYNTAX_ERROR;
@@ -1515,7 +1515,7 @@ parse_cmd_line(struct opts_t *op, int argc, char *argv[],
break;
case 'A':
j = sg_get_num(optarg);
- if ((j < 0) || (j > UINT16_MAX)) {
+ if ((j < 0) || (j > (int)UINT16_MAX)) {
pr2serr("bad argument to '--atomic='. Expect 0 to 0xffff "
"inclusive\n");
return SG_LIB_SYNTAX_ERROR;
@@ -1720,7 +1720,7 @@ parse_cmd_line(struct opts_t *op, int argc, char *argv[],
break;
case 'S':
j = sg_get_num(optarg);
- if ((j < 0) || (j > UINT16_MAX)) {
+ if ((j < 0) || (j > (int)UINT16_MAX)) {
pr2serr("bad argument to '--scattered='. Expect 0 to 0xffff "
"inclusive\n");
return SG_LIB_SYNTAX_ERROR;
@@ -1731,7 +1731,7 @@ parse_cmd_line(struct opts_t *op, int argc, char *argv[],
break;
case 't': /* same as --tag-mask= */
j = sg_get_num(optarg);
- if ((j < 0) || (j > UINT16_MAX)) {
+ if ((j < 0) || (j > (int)UINT16_MAX)) {
pr2serr("bad argument to '--tag-mask='. Expect 0 to 0xffff "
"inclusive\n");
return SG_LIB_SYNTAX_ERROR;
@@ -1740,7 +1740,7 @@ parse_cmd_line(struct opts_t *op, int argc, char *argv[],
break;
case 'T': /* WRITE STREAM */
j = sg_get_num(optarg);
- if ((j < 0) || (j > UINT16_MAX)) {
+ if ((j < 0) || (j > (int)UINT16_MAX)) {
pr2serr("bad argument to '--stream=', expect 0 to 65535\n");
return SG_LIB_SYNTAX_ERROR;
}