From: Andre Noll Date: Wed, 24 Dec 2014 02:55:52 +0000 (+0000) Subject: aft.c: Silence noisy warnings in com_add(). X-Git-Tag: v0.5.5~30 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=6d4179add38f41f609db21885e079145e4b5ea6a aft.c: Silence noisy warnings in com_add(). If the -a option to com_add() is not given, we ignore paths for which guess_audio_format() returns negative. Currently the add command sends a warning to the client for each skipped file, which may result in very verbose output. This commit silences the warning. --- diff --git a/aft.c b/aft.c index acf75156..4893f215 100644 --- a/aft.c +++ b/aft.c @@ -1876,8 +1876,10 @@ static int add_one_audio_file(const char *path, void *private_data) unsigned char hash[HASH_SIZE]; ret = guess_audio_format(path); - if (ret < 0 && !(pad->flags & ADD_FLAG_ALL)) + if (ret < 0 && !(pad->flags & ADD_FLAG_ALL)) { + ret = 0; goto out_free; + } query.data = (char *)path; query.size = strlen(path) + 1; ret = send_callback_request(path_brother_callback, &query,