ADD_DEFINITIONS("-Werror") # Make all warnings into errors
ADD_DEFINITIONS("-Wall") # Generate all warnings
ADD_DEFINITIONS("-Wextra") # Generate even more extra warnings
-# TODO Remove 'no-unused-parameter' after API implementation
-ADD_DEFINITIONS("-Wno-unused-parameter") # Supress unused parameter warning
ADD_DEFINITIONS("-pedantic") # Be pedantic
ADD_DEFINITIONS("-pedantic-errors") # Make pedantic warnings into errors
ADD_DEFINITIONS(-DPROJECT_SOURCE_DIR="${PROJECT_SOURCE_DIR}")
yaca_key_destroy(lkey);
}
-int main(int argc, char *argv[])
+int main()
{
int ret;
yaca_key_h key = YACA_KEY_NULL;
static pthread_mutex_t *mutexes = NULL;
-static void locking_callback(int mode, int type, const char *file, int line)
+static void locking_callback(int mode, int type, UNUSED const char *file, UNUSED int line)
{
/* Ignore NULL mutexes and lock/unlock error codes as we can't do anything
* about them. */
}
}
-static int get_digest_output_length(const yaca_context_h ctx, size_t input_len, size_t *output_len)
+static int get_digest_output_length(const yaca_context_h ctx,
+ UNUSED size_t input_len,
+ size_t *output_len)
{
struct yaca_digest_ctx_s *c = get_digest_ctx(ctx);
#include <yaca_types.h>
#define API __attribute__ ((visibility("default")))
+#define UNUSED __attribute__((unused))
enum yaca_ctx_type_e {
YACA_CTX_INVALID = 0,
/* This callback only exists to block the default OpenSSL one and
* allow us to check for a proper error code when the key is encrypted
*/
-int password_dummy_cb(char *buf, int size, int rwflag, void *u)
+int password_dummy_cb(char *buf, UNUSED int size, UNUSED int rwflag, UNUSED void *u)
{
const char empty[] = "";
}
static int get_sign_output_length(const yaca_context_h ctx,
- size_t input_len,
+ UNUSED size_t input_len,
size_t *output_len)
{
struct yaca_sign_ctx_s *c = get_sign_ctx(ctx);