remove_helper (void *unused,
const char *fn)
{
+ (void) unused;
(void) GNUNET_DISK_directory_remove (fn);
return GNUNET_OK;
}
uint64_t pos;
uint64_t size;
size_t len;
+ ssize_t sret;
struct GNUNET_DISK_FileHandle *in;
struct GNUNET_DISK_FileHandle *out;
len = COPY_BLK_SIZE;
if (len > size - pos)
len = size - pos;
- if (len != GNUNET_DISK_file_read (in, buf, len))
+ sret = GNUNET_DISK_file_read (in,
+ buf,
+ len);
+ if ( (sret < 0) ||
+ (len != (size_t) sret) )
goto FAIL;
- if (len != GNUNET_DISK_file_write (out, buf, len))
+ sret = GNUNET_DISK_file_write (out,
+ buf,
+ len);
+ if ( (sret < 0) ||
+ (len != (size_t) sret) )
goto FAIL;
pos += len;
}
{
c = *idx;
- if (c == '/' || c == '\\' || c == ':' || c == '*' || c == '?' || c == '"' ||
+ if (c == '/' || c == '\\' || c == ':' ||
+ c == '*' || c == '?' || c == '"' ||
c == '<' || c == '>' || c == '|')
{
*idx = '_';
* @return handle to the new pipe, NULL on error
*/
struct GNUNET_DISK_PipeHandle *
-GNUNET_DISK_pipe (int blocking_read, int blocking_write, int inherit_read, int inherit_write)
+GNUNET_DISK_pipe (int blocking_read,
+ int blocking_write,
+ int inherit_read,
+ int inherit_write)
{
#ifndef MINGW
int fd[2];
int ret;
int eno;
+ (void) inherit_read;
+ (void) inherit_write;
ret = pipe (fd);
if (ret == -1)
{
eno = errno;
- LOG_STRERROR (GNUNET_ERROR_TYPE_ERROR, "pipe");
+ LOG_STRERROR (GNUNET_ERROR_TYPE_ERROR,
+ "pipe");
errno = eno;
return NULL;
}
{
const char *version = scls;
+ (void) option;
+ (void) value;
printf ("%s v%s\n",
ctx->binaryName,
version);
const struct GNUNET_GETOPT_CommandLineOption *opt;
const struct GNUNET_OS_ProjectData *pd;
+ (void) option;
+ (void) value;
if (NULL != about)
{
printf ("%s\n%s\n", ctx->binaryOptions, gettext (about));
}
i = 0;
opt = ctx->allOptions;
- while (opt[i].description != NULL)
+ while (NULL != opt[i].description)
{
if (opt[i].shortName == '\0')
printf (" ");
printf (" -%c, ", opt[i].shortName);
printf ("--%s", opt[i].name);
slen = 8 + strlen (opt[i].name);
- if (opt[i].argumentHelp != NULL)
+ if (NULL != opt[i].argumentHelp)
{
printf ("=%s", opt[i].argumentHelp);
slen += 1 + strlen (opt[i].argumentHelp);
OUTER:
while (ml - p > 78 - slen)
{
- for (j = p + 78 - slen; j > p; j--)
+ for (j = p + 78 - slen; j > (int) p; j--)
{
if (isspace ((unsigned char) trans[j]))
{
{
unsigned int *val = scls;
+ (void) ctx;
+ (void) option;
+ (void) value;
(*val)++;
return GNUNET_OK;
}
*/
struct GNUNET_GETOPT_CommandLineOption
GNUNET_GETOPT_option_increment_uint (char shortName,
- const char *name,
- const char *description,
- unsigned int *val)
+ const char *name,
+ const char *description,
+ unsigned int *val)
{
struct GNUNET_GETOPT_CommandLineOption clo = {
.shortName = shortName,
{
int *val = scls;
+ (void) ctx;
+ (void) option;
+ (void) value;
*val = 1;
return GNUNET_OK;
}
*/
struct GNUNET_GETOPT_CommandLineOption
GNUNET_GETOPT_option_flag (char shortName,
- const char *name,
- const char *description,
- int *val)
+ const char *name,
+ const char *description,
+ int *val)
{
struct GNUNET_GETOPT_CommandLineOption clo = {
.shortName = shortName,
{
char **val = scls;
+ (void) ctx;
+ (void) option;
GNUNET_assert (NULL != value);
GNUNET_free_non_null (*val);
*val = GNUNET_strdup (value);
{
char **val = scls;
+ (void) ctx;
+ (void) option;
GNUNET_assert (NULL != value);
GNUNET_free_non_null (*val);
*val = GNUNET_STRINGS_filename_expand (value);
*/
struct GNUNET_GETOPT_CommandLineOption
GNUNET_GETOPT_option_filename (char shortName,
- const char *name,
- const char *argumentHelp,
- const char *description,
- char **str)
+ const char *name,
+ const char *argumentHelp,
+ const char *description,
+ char **str)
{
struct GNUNET_GETOPT_CommandLineOption clo = {
.shortName = shortName,
{
unsigned long long *val = scls;
+ (void) ctx;
if (1 != SSCANF (value,
"%llu",
val))
*/
struct GNUNET_GETOPT_CommandLineOption
GNUNET_GETOPT_option_ulong (char shortName,
- const char *name,
- const char *argumentHelp,
- const char *description,
- unsigned long long *val)
+ const char *name,
+ const char *argumentHelp,
+ const char *description,
+ unsigned long long *val)
{
struct GNUNET_GETOPT_CommandLineOption clo = {
.shortName = shortName,
const char *value)
{
struct GNUNET_TIME_Relative *val = scls;
-
+
+ (void) ctx;
if (GNUNET_OK !=
GNUNET_STRINGS_fancy_time_to_relative (value,
val))
*/
struct GNUNET_GETOPT_CommandLineOption
GNUNET_GETOPT_option_relative_time (char shortName,
- const char *name,
- const char *argumentHelp,
- const char *description,
- struct GNUNET_TIME_Relative *val)
+ const char *name,
+ const char *argumentHelp,
+ const char *description,
+ struct GNUNET_TIME_Relative *val)
{
struct GNUNET_GETOPT_CommandLineOption clo = {
.shortName = shortName,
{
struct GNUNET_TIME_Absolute *val = scls;
+ (void) ctx;
if (GNUNET_OK !=
GNUNET_STRINGS_fancy_time_to_absolute (value,
val))
*/
struct GNUNET_GETOPT_CommandLineOption
GNUNET_GETOPT_option_absolute_time (char shortName,
- const char *name,
- const char *argumentHelp,
- const char *description,
- struct GNUNET_TIME_Absolute *val)
+ const char *name,
+ const char *argumentHelp,
+ const char *description,
+ struct GNUNET_TIME_Absolute *val)
{
struct GNUNET_GETOPT_CommandLineOption clo = {
.shortName = shortName,
{
unsigned int *val = scls;
+ (void) ctx;
if (1 != SSCANF (value,
"%u",
val))
*/
struct GNUNET_GETOPT_CommandLineOption
GNUNET_GETOPT_option_uint (char shortName,
- const char *name,
- const char *argumentHelp,
- const char *description,
- unsigned int *val)
+ const char *name,
+ const char *argumentHelp,
+ const char *description,
+ unsigned int *val)
{
struct GNUNET_GETOPT_CommandLineOption clo = {
.shortName = shortName,
{
struct Base32Context *bc = scls;
+ (void) ctx;
if (GNUNET_OK !=
GNUNET_STRINGS_string_to_data (value,
strlen (value),