aboutsummaryrefslogtreecommitdiffstats
path: root/tests/opassuan
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2016-09-13 18:48:06 +0000
committerWerner Koch <[email protected]>2016-09-13 18:48:06 +0000
commit9064eebdc05e7149c2c8cc899fbd7874622fb769 (patch)
treee5bffc999f3c38f13cde215945ae8683a5e0c891 /tests/opassuan
parenttests: Use gpgme_io_write in passhrase callbacks. (diff)
downloadgpgme-9064eebdc05e7149c2c8cc899fbd7874622fb769.tar.gz
gpgme-9064eebdc05e7149c2c8cc899fbd7874622fb769.zip
tests: Mark lots of unused vars and fix const mismatches.
Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'tests/opassuan')
-rw-r--r--tests/opassuan/t-command.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/tests/opassuan/t-command.c b/tests/opassuan/t-command.c
index 87f82024..9c791eee 100644
--- a/tests/opassuan/t-command.c
+++ b/tests/opassuan/t-command.c
@@ -7,12 +7,12 @@
under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation; either version 2.1 of
the License, or (at your option) any later version.
-
+
GPGME is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
-
+
You should have received a copy of the GNU Lesser General Public
License along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
@@ -46,9 +46,12 @@
static gpgme_error_t
data_cb (void *opaque, const void *data, size_t datalen)
{
+ (void)opaque;
+ (void)data;
+
printf ("DATA_CB: datalen=%d\n", (int)datalen);
return 0;
-}
+}
static gpgme_error_t
@@ -58,12 +61,14 @@ inq_cb (void *opaque, const char *name, const char *args,
gpgme_data_t data;
gpgme_error_t err;
+ (void)opaque;
+
if (name)
{
printf ("INQ_CB: name=`%s' args=`%s'\n", name, args);
/* There shall be no data object. */
assert (!*r_data);
-
+
err = gpgme_data_new (&data);
fail_if_err (err);
*r_data = data;
@@ -85,19 +90,21 @@ inq_cb (void *opaque, const char *name, const char *args,
return 0;
-}
+}
static gpgme_error_t
status_cb (void *opaque, const char *status, const char *args)
{
+ (void)opaque;
+
printf ("STATUS_CB: status=`%s' args=`%s'\n", status, args);
return 0;
-}
+}
-int
+int
main (int argc, char **argv)
{
gpgme_error_t err;
@@ -118,7 +125,7 @@ main (int argc, char **argv)
argv++;
}
command = argc? *argv : "NOP";
-
+
err = gpgme_new (&ctx);
fail_if_err (err);