aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-04-07 18:05:19 +0200
committerMattias Andrée <maandree@operamail.com>2014-04-07 18:05:19 +0200
commite524edd8a428111acc97ed5f82a67a5634221d8e (patch)
treea2fb56098917219b31e85c06727cc18f36ae6c5e /src
parentfix warnings + update gitignore (diff)
downloadlibpassphrase-e524edd8a428111acc97ed5f82a67a5634221d8e.tar.gz
libpassphrase-e524edd8a428111acc97ed5f82a67a5634221d8e.tar.bz2
libpassphrase-e524edd8a428111acc97ed5f82a67a5634221d8e.tar.xz
fix warnings
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src')
-rw-r--r--src/passphrase.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/passphrase.c b/src/passphrase.c
index 2098b31..679e1fa 100644
--- a/src/passphrase.c
+++ b/src/passphrase.c
@@ -158,7 +158,10 @@ char* passphrase_read(void)
c = (char)cc;
if (point == len)
{
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wpedantic"
xputchar(c);
+#pragma GCC diagnostic pop
*(rc + len++) = c;
point++;
}
@@ -170,7 +173,10 @@ char* passphrase_read(void)
{
if ((c & 0xC0) != 0x80)
{ xprintf("\033[@"); }
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wpedantic"
xputchar(c);
+#pragma GCC diagnostic pop
for (i = len; i > point; i--)
*(rc + i) = *(rc + i - 1);
len++;
@@ -195,10 +201,10 @@ char* passphrase_read(void)
cn <<= 1;
n++;
}
- n = n ?: 1;
+ n = n ? n : 1;
if (len + n > size)
{
- if ((rc = xrealloc(rc, size, size << 1L)) == NULL)
+ if ((rc = xrealloc(rc, (size_t)size, (size_t)size << 1L)) == NULL)
return NULL;
size <<= 1L;
}
@@ -209,7 +215,10 @@ char* passphrase_read(void)
{
if (i)
c = getchar();
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wpedantic"
xputchar(c);
+#pragma GCC diagnostic pop
*(rc + point++) = c;
}
}