GtkTreeIter iter;
if (!gtk_tree_model_iter_nth_child(model, &iter, NULL, row)) {
- g_warning("%s(%d) - no iter found???\n", __FILE__, __LINE__);
+ g_warning("%s(%d) - no iter found???", __FILE__, __LINE__);
continue;
}
if (account->sig_type == SIG_FILE) {
if (!is_file_or_fifo_exist(account->sig_path)) {
- g_warning("can't open signature file: %s\n",
+ g_warning("can't open signature file: '%s'",
account->sig_path);
return NULL;
}
fileSpec = NULL;
return book->retVal;
fail:
- g_warning("error writing AB\n");
+ g_warning("error writing AB");
book->retVal = MGU_ERROR_WRITE;
if (pfile)
prefs_file_close_revert( pfile );
if (connection == NULL || *error) {
if (! *error)
g_set_error(error, client_object_error_quark(), 1, "Unable to connect to dbus");
- g_warning("Unable to connect to dbus: %s\n", (*error)->message);
+ g_warning("Unable to connect to dbus: %s", (*error)->message);
return FALSE;
}
"/org/clawsmail/contacts",
"org.clawsmail.Contacts");
if (proxy == NULL) {
- g_warning("Could not get a proxy object\n");
+ g_warning("Could not get a proxy object");
g_set_error(error, client_object_error_quark(), 1, "Could not get a proxy object");
return FALSE;
}
utf8 = g_convert(locale, -1, "UTF-8", current, &read, &write, &error);
if (error) {
- g_warning("Fail to convert [%s]: %s\n", charset, error->message);
+ g_warning("Failed to convert [%s]: %s", charset, error->message);
g_free(current);
return NULL;
}
void addressbook_install_hooks(GError** error) {
if ((guint)-1 == hooks_register_hook(
COMPOSE_CREATED_HOOKLIST, my_compose_create_hook, NULL)) {
- g_warning("Could not register hook for adding vCards\n");
+ g_warning("Could not register hook for adding vCards");
if (error) {
g_set_error(error, client_object_error_quark(), 1,
"Could not register hook for adding vCards");
if ( !is_dir_exist(indexdir) ) {
if ( make_dir(indexdir) < 0 ) {
addrindex_set_file_path( addrIndex, get_rc_dir() );
- g_warning( "couldn't create dir %s\n", indexdir);
+ g_warning( "couldn't create dir '%s'", indexdir);
} else {
if (!migrate_addrbook(get_rc_dir(), indexdir)) {
remove_dir_recursive(indexdir);
atci->iconXpm = icon; \
atci->iconXpmOpen = iconopen; \
} else { \
- g_warning("can't get atci %d\n", id); \
+ g_warning("can't get atci %d", id); \
} \
}
addressbook_foldersel_load_data( addrIndex, &folder_path_match );
if ( folder_path_match.folder_path != NULL && folder_path_match.matched == FALSE)
- g_warning("addressbook_foldersel_load_data: couldn't match book/folder path '%s'\n", path);
+ g_warning("addressbook_foldersel_load_data: couldn't match book/folder path '%s'", path);
g_strfreev( folder_path_match.folder_path );
fileSpec = NULL;
return addrIndex->retVal;
fail:
- g_warning("error writing AB index\n");
+ g_warning("error writing AB index");
addrIndex->retVal = MGU_ERROR_WRITE;
if (pfile)
prefs_file_close_revert( pfile );
folderpath must not be empty or NULL */
if( ! addressbook_peek_folder_exists( folderpath, &book, &folder ) ) {
- g_warning("addrindex_load_completion: folder path '%s' doesn't exist\n", folderpath);
+ g_warning("addrindex_load_completion: folder path '%s' doesn't exist", folderpath);
return FALSE;
}
return TRUE;
} else {
- g_warning("addrindex_load_completion: book/folder path is valid but got no pointer\n");
+ g_warning("addrindex_load_completion: book/folder path is valid but got no pointer");
}
}
return FALSE;
if (fgets(buf, (len < maxlen)? len: maxlen, xfp) == NULL) {
fclose(xfp);
g_free(xfile);
- g_warning("header content file '%s' read failure\n", anyname);
+ g_warning("header content file '%s' read failure", anyname);
return -2;
}
lastc = strlen(buf) - 1; /* remove trailing \n */
g_free(filename);
return result;
}
- g_warning("header xface filename invalid\n");
+ g_warning("header xface filename invalid");
return -1;
}
g_free(filename);
return result;
}
- g_warning("header face filename invalid\n");
+ g_warning("header face filename invalid");
return -1;
}
if (cd == (iconv_t)-1) {
cd = iconv_open(CS_UTF_8, CS_EUC_JP);
if (cd == (iconv_t)-1) {
- g_warning("conv_euctoutf8(): %s\n",
+ g_warning("conv_euctoutf8(): %s",
g_strerror(errno));
iconv_ok = FALSE;
strncpy2(outbuf, inbuf, outlen);
if (cd == (iconv_t)-1) {
cd = iconv_open(CS_EUC_JP, CS_UTF_8);
if (cd == (iconv_t)-1) {
- g_warning("conv_utf8toeuc(): %s\n",
+ g_warning("conv_utf8toeuc(): %s",
g_strerror(errno));
iconv_ok = FALSE;
strncpy2(outbuf, inbuf, outlen);
} else if (E2BIG == errno) {
EXPAND_BUF();
} else {
- g_warning("conv_iconv_strdup(): %s\n",
+ g_warning("conv_iconv_strdup(): %s",
g_strerror(errno));
break;
}
if (E2BIG == errno) {
EXPAND_BUF();
} else {
- g_warning("conv_iconv_strdup(): %s\n",
+ g_warning("conv_iconv_strdup(): %s",
g_strerror(errno));
break;
}
*dest = '\0';
return;
} else {
- g_warning("conv_encode_header(): code conversion failed\n");
+ g_warning("conv_encode_header(): code conversion failed");
conv_unreadable_8bit(part_str);
out_str = g_strdup(part_str);
}
out_str = conv_codeset_strdup
(part_str, cur_encoding, out_encoding);
if (!out_str) {
- g_warning("conv_encode_header(): code conversion failed\n");
+ g_warning("conv_encode_header(): code conversion failed");
conv_unreadable_8bit(part_str);
out_str = g_strdup(part_str);
}
utf8_file = g_filename_to_utf8(fs_file, -1, NULL, NULL, &error);
if (error) {
- g_warning("failed to convert encoding of file name: %s\n",
+ g_warning("failed to convert encoding of file name: %s",
error->message);
g_error_free(error);
}
#endif
if ((pfile = prefs_write_open(rcpath)) == NULL ||
(prefs_set_block_label(pfile, block) < 0)) {
- g_warning("failed to write plugin list\n");
+ g_warning("failed to write plugin list");
g_free(rcpath);
return;
}
goto revert;
if (prefs_file_close(pfile) < 0)
- g_warning("failed to write plugin list\n");
+ g_warning("failed to write plugin list");
g_free(rcpath);
continue;
revert:
- g_warning("failed to write plugin list\n");
+ g_warning("failed to write plugin list");
if (prefs_file_close_revert(pfile) < 0)
- g_warning("failed to revert plugin list\n");
+ g_warning("failed to revert plugin list");
g_free(rcpath);
}
len = strlen(licence);
}
if (len == 0) {
- g_warning("plugin licence check failed: empty licence\n");
+ g_warning("plugin licence check failed: empty licence");
return FALSE;
}
while (plugin_licence_tokens[i] != NULL) {
replace_old_plugin_name(buf);
if ((buf[0] != '\0') && (plugin_load(buf, &error) == NULL)) {
- g_warning("plugin loading error: %s\n", error);
+ g_warning("plugin loading error: %s", error);
g_free(error);
}
}
cm_return_val_if_fail(path != NULL, NULL);
if (prefs_is_readonly(path)) {
- g_warning("no permission - %s\n", path);
+ g_warning("no write permission on '%s'", path);
return NULL;
}
/* next block */
if (buf[0] == '[') {
if (fputs(buf, fp) == EOF) {
- g_warning("failed to write configuration to file\n");
+ g_warning("failed to write configuration to file");
prefs_file_close_revert(pfile);
return -1;
while (fgets(buf, sizeof(buf), orig_fp) != NULL)
if (fputs(buf, fp) == EOF) {
- g_warning("failed to write configuration to file\n");
+ g_warning("failed to write configuration to file");
prefs_file_close_revert(pfile);
return -1;
break;
} else {
if (fputs(buf, pfile->fp) == EOF) {
- g_warning("failed to write configuration to file\n");
+ g_warning("failed to write configuration to file");
prefs_file_close_revert(pfile);
g_free(block_label);
if (fputs(block_label, pfile->fp) == EOF ||
fputc('\n', pfile->fp) == EOF) {
- g_warning("failed to write configuration to file\n");
+ g_warning("failed to write configuration to file");
prefs_file_close_revert(pfile);
g_free(block_label);
{
Session *session = SESSION(data);
- g_warning("session timeout.\n");
+ g_warning("session timeout.");
if (session->io_tag > 0) {
g_source_remove(session->io_tag);
sock_set_nonblocking_mode(session->sock, FALSE);
if (!ssl_init_socket(session->sock)) {
- g_warning("couldn't start TLS session.\n");
+ g_warning("couldn't start TLS session.");
if (nb_mode)
sock_set_nonblocking_mode(session->sock, session->nonblocking);
return -1;
SESSION_BUFFSIZE - 1);
if (read_len == -1 && session->state == SESSION_DISCONNECTED) {
- g_warning ("sock_read: session disconnected\n");
+ g_warning ("sock_read: session disconnected");
if (session->io_tag > 0) {
g_source_remove(session->io_tag);
session->io_tag = 0;
}
if (read_len == 0) {
- g_warning("sock_read: received EOF\n");
+ g_warning("sock_read: received EOF");
session->state = SESSION_EOF;
return FALSE;
}
case EAGAIN:
return TRUE;
default:
- g_warning("sock_read: %s\n", g_strerror(errno));
+ g_warning("sock_read: %s", g_strerror(errno));
session->state = SESSION_ERROR;
return FALSE;
}
SESSION_BUFFSIZE);
if (read_len == 0) {
- g_warning("sock_read: received EOF\n");
+ g_warning("sock_read: received EOF");
session->state = SESSION_EOF;
return FALSE;
}
case EAGAIN:
return TRUE;
default:
- g_warning("sock_read: %s\n", g_strerror(errno));
+ g_warning("sock_read: %s", g_strerror(errno));
session->state = SESSION_ERROR;
return FALSE;
}
write_len = 0;
break;
default:
- g_warning("sock_write: %s\n", g_strerror(errno));
+ g_warning("sock_write: %s", g_strerror(errno));
session->state = SESSION_ERROR;
return -1;
}
write_len = 0;
break;
default:
- g_warning("sock_write: %s\n", g_strerror(errno));
+ g_warning("sock_write: %s", g_strerror(errno));
session->state = SESSION_ERROR;
return -1;
}
result = WSAStartup(MAKEWORD(2, 2), &wsadata);
if (result != NO_ERROR) {
- g_warning("WSAStartup() failed\n");
+ g_warning("WSAStartup() failed");
return -1;
}
#endif
sock = socket(AF_INET, SOCK_STREAM, 0);
if (!SOCKET_IS_VALID(sock)) {
#ifdef G_OS_WIN32
- g_warning("fd_open_inet(): socket() failed: %d\n",
+ g_warning("fd_open_inet(): socket() failed: %d",
WSAGetLastError());
#else
perror("fd_open_inet(): socket");
if (FD_ISSET(fd, &fds)) {
return 0;
} else {
- g_warning("Socket IO timeout\n");
+ g_warning("Socket IO timeout");
log_error(LOG_PROTOCOL, _("Socket IO timeout.\n"));
return -1;
}
g_free(conn_data->hostname);
g_free(conn_data);
} else {
- g_warning("sock_connect_async_cancel: id %d not found.\n", id);
+ g_warning("sock_connect_async_cancel: id %d not found", id);
return -1;
}
g_io_channel_set_encoding(source, NULL, &err);
if (err) {
- g_warning("can unset encoding: %s\n", err->message);
+ g_warning("can unset encoding: %s", err->message);
g_error_free(err);
return FALSE;
}
if (g_io_channel_read_chars(source, &len, sizeof(len),
&bytes_read, &err) == G_IO_STATUS_NORMAL) {
if (err != NULL) {
- g_warning("g_io_channel_read_chars: %s\n", err->message);
+ g_warning("g_io_channel_read_chars: %s", err->message);
g_error_free(err);
return FALSE;
}
if (g_io_channel_read_chars(source, cur, todo,
&bytes_read, &err) != G_IO_STATUS_NORMAL) {
if (err) {
- g_warning("canonical name not read %s\n", err->message);
+ g_warning("canonical name not read %s", err->message);
g_free(canonical_name);
canonical_name = NULL;
g_error_free(err);
todo -= bytes_read;
}
if (bytes_read == 0) {
- g_warning("canonical name not read\n");
+ g_warning("canonical name not read");
g_free(canonical_name);
canonical_name = NULL;
break;
sizeof(ai_member), &bytes_read, &err)
!= G_IO_STATUS_NORMAL) {
if (err != NULL) {
- g_warning("g_io_channel_read_chars: addr len %s\n", err->message);
+ g_warning("g_io_channel_read_chars: addr len %s", err->message);
g_error_free(err);
err = NULL;
break;
break;
if (ai_member[0] == AF_UNSPEC) {
- g_warning("DNS lookup failed\n");
+ g_warning("DNS lookup failed");
log_error(LOG_PROTOCOL, _("%s:%d: unknown host.\n"),
lookup_data->hostname, lookup_data->port);
break;
&bytes_read, &err)
!= G_IO_STATUS_NORMAL) {
if (err != NULL) {
- g_warning("g_io_channel_read_chars: addr data read %s\n", err->message);
+ g_warning("g_io_channel_read_chars: addr data read %s", err->message);
g_error_free(err);
err = NULL;
g_free(addr);
if (bytes_read != ai_member[3]) {
g_warning("sock_get_address_info_async_cb: "
- "incomplete address data\n");
+ "incomplete address data");
g_free(addr);
break;
}
gai_err = getaddrinfo(parm->hostname, port_str, &hints, &res);
if (gai_err != 0) {
gchar len = 0;
- g_warning("getaddrinfo for %s:%s failed: %s\n",
+ g_warning("getaddrinfo for %s:%s failed: %s",
parm->hostname, port_str, gai_strerror(gai_err));
log_error(LOG_PROTOCOL, _("%s:%s: host lookup failed (%s).\n"),
parm->hostname, port_str, gai_strerror(gai_err));
gnutls_x509_crt_init(&certs[i]);
r = gnutls_x509_crt_import(certs[i], &raw_cert_list[i], GNUTLS_X509_FMT_DER);
if (r < 0) {
- g_warning("cert get failure: %d %s\n", r, gnutls_strerror(r));
+ g_warning("cert get failure: %d %s", r, gnutls_strerror(r));
result = FALSE;
i--;
if (claws_ssl_get_cert_file()) {
r = gnutls_certificate_set_x509_trust_file(xcred, claws_ssl_get_cert_file(), GNUTLS_X509_FMT_PEM);
if (r < 0)
- g_warning("Can't read SSL_CERT_FILE %s: %s\n",
+ g_warning("Can't read SSL_CERT_FILE '%s': %s",
claws_ssl_get_cert_file(),
gnutls_strerror(r));
} else {
size = 0;
if (gnutls_x509_crt_init(&dest) != 0) {
- g_warning("couldn't gnutls_x509_crt_init\n");
+ g_warning("couldn't gnutls_x509_crt_init");
return NULL;
}
if (gnutls_x509_crt_export(src, GNUTLS_X509_FMT_DER, NULL, &size)
!= GNUTLS_E_SHORT_MEMORY_BUFFER) {
- g_warning("couldn't gnutls_x509_crt_export to get size\n");
+ g_warning("couldn't gnutls_x509_crt_export to get size");
gnutls_x509_crt_deinit(dest);
return NULL;
}
tmp.size = size;
ret = gnutls_x509_crt_import(dest, &tmp, GNUTLS_X509_FMT_DER);
if (ret) {
- g_warning("couldn't gnutls_x509_crt_import for real (%d %s)\n", ret, gnutls_strerror(ret));
+ g_warning("couldn't gnutls_x509_crt_import for real (%d %s)", ret, gnutls_strerror(ret));
gnutls_x509_crt_deinit(dest);
dest = NULL;
}
} else {
- g_warning("couldn't gnutls_x509_crt_export for real (%d %s)\n", ret, gnutls_strerror(ret));
+ g_warning("couldn't gnutls_x509_crt_export for real (%d %s)", ret, gnutls_strerror(ret));
gnutls_x509_crt_deinit(dest);
dest = NULL;
}
int r;
if ((r = gnutls_x509_crt_export(x509_cert, format, output, &cert_size)) < 0) {
- g_warning("couldn't export cert %s (%zd)\n", gnutls_strerror(r), cert_size);
+ g_warning("couldn't export cert %s (%zd)", gnutls_strerror(r), cert_size);
return;
}
debug_print("writing %zd bytes\n",cert_size);
if (fwrite(&output, 1, cert_size, fp) < cert_size) {
- g_warning("failed to write cert: %d %s\n", errno, g_strerror(errno));
+ g_warning("failed to write cert: %d %s", errno, g_strerror(errno));
}
}
*output = malloc(cert_size);
if ((r = gnutls_x509_crt_export(x509_cert, GNUTLS_X509_FMT_DER, *output, &cert_size)) < 0) {
- g_warning("couldn't export cert %s (%zd)\n", gnutls_strerror(r), cert_size);
+ g_warning("couldn't export cert %s (%zd)", gnutls_strerror(r), cert_size);
free(*output);
*output = NULL;
return 0;
*output = malloc(key_size);
if ((r = gnutls_x509_privkey_export(pkey, GNUTLS_X509_FMT_DER, *output, &key_size)) < 0) {
- g_warning("couldn't export key %s (%zd)\n", gnutls_strerror(r), key_size);
+ g_warning("couldn't export key %s (%zd)", gnutls_strerror(r), key_size);
free(*output);
*output = NULL;
return 0;
if ((r = gnutls_x509_crt_export(cert_a->x509_cert, GNUTLS_X509_FMT_DER, NULL, &cert_size_a))
!= GNUTLS_E_SHORT_MEMORY_BUFFER) {
- g_warning("couldn't gnutls_x509_crt_export to get size a %s\n", gnutls_strerror(r));
+ g_warning("couldn't gnutls_x509_crt_export to get size a %s", gnutls_strerror(r));
return FALSE;
}
if ((r = gnutls_x509_crt_export(cert_b->x509_cert, GNUTLS_X509_FMT_DER, NULL, &cert_size_b))
!= GNUTLS_E_SHORT_MEMORY_BUFFER) {
- g_warning("couldn't gnutls_x509_crt_export to get size b %s\n", gnutls_strerror(r));
+ g_warning("couldn't gnutls_x509_crt_export to get size b %s", gnutls_strerror(r));
return FALSE;
}
output_a = g_malloc(cert_size_a);
output_b = g_malloc(cert_size_b);
if ((r = gnutls_x509_crt_export(cert_a->x509_cert, GNUTLS_X509_FMT_DER, output_a, &cert_size_a)) < 0) {
- g_warning("couldn't gnutls_x509_crt_export a %s\n", gnutls_strerror(r));
+ g_warning("couldn't gnutls_x509_crt_export a %s", gnutls_strerror(r));
g_free(output_a);
g_free(output_b);
return FALSE;
}
if ((r = gnutls_x509_crt_export(cert_b->x509_cert, GNUTLS_X509_FMT_DER, output_b, &cert_size_b)) < 0) {
- g_warning("couldn't gnutls_x509_crt_export b %s\n", gnutls_strerror(r));
+ g_warning("couldn't gnutls_x509_crt_export b %s", gnutls_strerror(r));
g_free(output_a);
g_free(output_b);
return FALSE;
}
if (cert_size_a != cert_size_b) {
- g_warning("size differ %zd %zd\n", cert_size_a, cert_size_b);
+ g_warning("size differ %zd %zd", cert_size_a, cert_size_b);
g_free(output_a);
g_free(output_b);
return FALSE;
}
if (memcmp(output_a, output_b, cert_size_a)) {
- g_warning("contents differ\n");
+ g_warning("contents differ");
g_free(output_a);
g_free(output_b);
return FALSE;
}
if (r < 0)
- g_warning("Can't read SSL_CERT_FILE %s: %s\n",
+ g_warning("Can't read SSL_CERT_FILE '%s': %s",
claws_ssl_get_cert_file(),
gnutls_strerror(r));
} else {
}
if (!tmpl->name) {
- g_warning("wrong template format\n");
+ g_warning("wrong template format");
template_free(tmpl);
fclose(fp);
return NULL;
}
if ((dir = g_dir_open(path, 0, NULL)) == NULL) {
- g_warning("failed to open directory: %s\n", path);
+ g_warning("failed to open directory: '%s'", path);
return NULL;
}
#define TRY(func) { \
if (!(func)) \
{ \
- g_warning("Failed to write template to file\n"); \
+ g_warning("Failed to write template to file"); \
if (fp) fclose(fp); \
if (new) claws_unlink(new); \
g_free(new); \
#define TRY_NO_CLOSE(func) { \
if (!(func)) \
{ \
- g_warning("Failed to write template to file\n"); \
+ g_warning("Failed to write template to file"); \
if (new) claws_unlink(new); \
g_free(new); \
g_free(filename); \
if (!is_dir_exist(path)) {
if (is_file_exist(path)) {
- g_warning("file %s already exists\n", path);
+ g_warning("file '%s' already exists", path);
return;
}
if (make_dir(path) < 0)
#define Xalloca(ptr, size, iffail) \
{ \
if ((ptr = alloca(size)) == NULL) { \
- g_warning("can't allocate memory\n"); \
+ g_warning("can't allocate memory"); \
iffail; \
} \
}
gchar *__tmp; \
\
if ((__tmp = alloca(strlen(str) + 1)) == NULL) { \
- g_warning("can't allocate memory\n"); \
+ g_warning("can't allocate memory"); \
iffail; \
} else \
strcpy(__tmp, str); \
gchar *__tmp; \
\
if ((__tmp = alloca(len + 1)) == NULL) { \
- g_warning("can't allocate memory\n"); \
+ g_warning("can't allocate memory"); \
iffail; \
} else { \
strncpy(__tmp, str, len); \
len1 = strlen(str1); \
len2 = strlen(str2); \
if ((__tmp = alloca(len1 + len2 + 1)) == NULL) { \
- g_warning("can't allocate memory\n"); \
+ g_warning("can't allocate memory"); \
iffail; \
} else { \
memcpy(__tmp, str1, len1); \
while (xml_parse_next_tag(file) == 0) {
if (file->level < level) break;
if (file->level == level) {
- g_warning("xml_build_tree(): Parse error\n");
+ g_warning("xml_build_tree(): Parse error");
break;
}
file->need_codeconv = FALSE;
}
} else {
- g_warning("Can't get xml dtd\n");
+ g_warning("Can't get XML DTD");
return -1;
}
}
if (xml_get_parenthesis(file, buf, sizeof(buf)) < 0) {
- g_warning("xml_parse_next_tag(): Can't parse next tag\n");
+ g_warning("xml_parse_next_tag(): Can't parse next tag");
return -1;
}
/* end-tag */
if (buf[0] == '/') {
if (strcmp(xml_get_current_tag(file)->tag, buf + 1) != 0) {
- g_warning("xml_parse_next_tag(): Tag name mismatch: %s (%s)\n", buf, xml_get_current_tag(file)->tag);
+ g_warning("xml_parse_next_tag(): Tag name mismatch: %s (%s)", buf, xml_get_current_tag(file)->tag);
return -1;
}
xml_pop_tag(file);
}
if (strlen(buf) == 0) {
- g_warning("xml_parse_next_tag(): Tag name is empty\n");
+ g_warning("xml_parse_next_tag(): Tag name is empty");
return -1;
}
while (g_ascii_isspace(*bufp)) bufp++;
attr_name = bufp;
if ((p = strchr(attr_name, '=')) == NULL) {
- g_warning("xml_parse_next_tag(): Syntax error in tag (a) %s\n", attr_name);
+ g_warning("xml_parse_next_tag(): Syntax error in tag (a) %s", attr_name);
return -1;
}
bufp = p;
while (g_ascii_isspace(*bufp)) bufp++;
if (*bufp != '"' && *bufp != '\'') {
- g_warning("xml_parse_next_tag(): Syntax error in tag (b) %s\n", bufp);
+ g_warning("xml_parse_next_tag(): Syntax error in tag (b) %s", bufp);
return -1;
}
quote = *bufp;
bufp++;
attr_value = bufp;
if ((p = strchr(attr_value, quote)) == NULL) {
- g_warning("xml_parse_next_tag(): Syntax error in tag (c) %s\n", attr_value);
+ g_warning("xml_parse_next_tag(): Syntax error in tag (c) %s", attr_value);
return -1;
}
bufp = p;
while ((start = strchr(p, '&')) != NULL) {
if ((end = strchr(start + 1, ';')) == NULL) {
- g_warning("Unescaped '&' appeared\n");
+ g_warning("Unescaped '&' appeared");
p = start + 1;
continue;
}
#define TRY(func) \
if (!(func)) \
{ \
- g_warning("failed to write part of xml tree\n"); \
+ g_warning("failed to write part of XML tree"); \
return -1; \
} \
for (i = 0; i < 8; i++) {
if (success[i] == FALSE) {
- g_warning("Compose: color allocation failed.\n");
+ g_warning("Compose: color allocation failed.");
quote_color1 = quote_color2 = quote_color3 =
quote_bgcolor1 = quote_bgcolor2 = quote_bgcolor3 =
signature_color = uri_color = black;
compose = compose_redirect(NULL, msginfo, FALSE);
break;
default:
- g_warning("compose_reply_mode(): invalid Compose Mode: %d\n", mode);
+ g_warning("compose_reply_mode(): invalid Compose Mode: %d", mode);
}
if (compose == NULL) {
msgfile = procmsg_get_message_file(msginfo);
if (!is_file_exist(msgfile))
- g_warning("%s: file not exist\n", msgfile);
+ g_warning("%s: file does not exist", msgfile);
else
compose_attach_append(compose, msgfile, msgfile,
"message/rfc822", NULL);
msgfile = procmsg_get_message_file((MsgInfo *)msginfo->data);
if (!is_file_exist(msgfile))
- g_warning("%s: file not exist\n", msgfile);
+ g_warning("%s: file does not exist", msgfile);
else
compose_attach_append(compose, msgfile, msgfile,
"message/rfc822", NULL);
fp = procmime_get_first_text_content(msginfo);
}
if (fp == NULL) {
- g_warning("Can't get text part\n");
+ g_warning("Can't get text part");
}
if (fp != NULL) {
if (len == 0) {
g_free(str);
- g_warning("compose_get_line_break_pos: len = 0!\n");
+ g_warning("compose_get_line_break_pos: len = 0!");
return FALSE;
}
last->bp = (bp_); last->ep = (ep_); last->pti = (pti_); \
last->next = NULL; \
} else { \
- g_warning("alloc error scanning URIs\n"); \
+ g_warning("alloc error scanning URIs"); \
}
static gboolean compose_beautify_paragraph(Compose *compose, GtkTextIter *par_iter, gboolean force)
\
len = strlen(str) + 3; \
if ((__tmp = alloca(len)) == NULL) { \
- g_warning("can't allocate memory\n"); \
+ g_warning("can't allocate memory"); \
g_string_free(header, TRUE); \
return NULL; \
} \
gchar *__tmp; \
\
if ((__tmp = alloca(strlen(str) + 1)) == NULL) { \
- g_warning("can't allocate memory\n"); \
+ g_warning("can't allocate memory"); \
g_string_free(header, TRUE); \
return NULL; \
} else \
\
len = strlen(str) + 3; \
if ((__tmp = alloca(len)) == NULL) { \
- g_warning("can't allocate memory\n"); \
+ g_warning("can't allocate memory"); \
errret; \
} \
g_snprintf(__tmp, len, "\"%s\"", str); \
gchar *__tmp; \
\
if ((__tmp = alloca(strlen(str) + 1)) == NULL) { \
- g_warning("can't allocate memory\n"); \
+ g_warning("can't allocate memory"); \
errret; \
} else \
strcpy(__tmp, str); \
procmsg_save_to_outbox(outbox, tmp_enc_file, TRUE);
claws_unlink(tmp_enc_file);
} else {
- g_warning("Can't open file %s\n", tmp_enc_file);
+ g_warning("Can't open file '%s'", tmp_enc_file);
}
} else {
- g_warning("couldn't get tempfile\n");
+ g_warning("couldn't get tempfile");
}
}
if (!privacy_encrypt(compose->privacy_system, mimemsg, compose->encdata)) {
/* chmod for security */
if (change_file_mode_rw(fp, file) < 0) {
FILE_OP_ERROR(file, "chmod");
- g_warning("can't change file mode\n");
+ g_warning("can't change file mode");
}
buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(compose->text));
folder_has_parent_of_type(item, F_DRAFT)
|| msginfo == compose->autosaved_draft)) {
if (folder_item_remove_msg(item, msginfo->msgnum) < 0) {
- g_warning("can't remove the old message\n");
+ g_warning("can't remove the old message");
return -1;
} else {
debug_print("removed reedit target %d\n", msginfo->msgnum);
if (change_file_mode_rw(fp, tmp) < 0) {
FILE_OP_ERROR(tmp, "chmod");
- g_warning("can't change file mode\n");
+ g_warning("can't change file mode");
}
/* queueing variables */
}
}
if (err == TRUE) {
- g_warning("failed to write queue message\n");
+ g_warning("failed to write queue message");
fclose(fp);
claws_unlink(tmp);
g_free(tmp);
queue = account_get_special_folder(compose->account, F_QUEUE);
}
if (!queue) {
- g_warning("can't find queue folder\n");
+ g_warning("can't find queue folder");
claws_unlink(tmp);
g_free(tmp);
return -1;
}
folder_item_scan(queue);
if ((num = folder_item_add_msg(queue, tmp, NULL, FALSE)) < 0) {
- g_warning("can't queue the message\n");
+ g_warning("can't queue the message");
claws_unlink(tmp);
g_free(tmp);
return -1;
g_snprintf(buf, sizeof(buf), prefs_common_get_ext_editor_cmd(), file);
} else {
if (prefs_common_get_ext_editor_cmd())
- g_warning("External editor command-line is invalid: '%s'\n",
+ g_warning("External editor command-line is invalid: '%s'",
prefs_common_get_ext_editor_cmd());
g_snprintf(buf, sizeof(buf), DEFAULT_EDITOR_CMD, file);
}
if (kill(pgid, SIGTERM) < 0) perror("kill");
waitpid(compose->exteditor_pid, NULL, 0);
- g_warning("Terminated process group id: %d", -pgid);
- g_warning("Temporary file: %s",
- compose->exteditor_file);
+ g_warning("Terminated process group id: %d. "
+ "Temporary file: %s", -pgid, compose->exteditor_file);
compose_set_ext_editor_sensitive(compose, TRUE);
compose->modified = TRUE;
g_free(chars);
} else if (buf[0] == '1') { /* failed */
- g_warning("Couldn't exec external editor\n");
+ g_warning("Couldn't exec external editor");
if (claws_unlink(compose->exteditor_file) < 0)
FILE_OP_ERROR(compose->exteditor_file, "unlink");
} else if (buf[0] == '2') {
- g_warning("Couldn't write to file\n");
+ g_warning("Couldn't write to file");
} else if (buf[0] == '3') {
- g_warning("Pipe read failed\n");
+ g_warning("Pipe read failed");
}
compose_set_ext_editor_sensitive(compose, TRUE);
/* chmod for security */
if (change_file_mode_rw(fp, tmp) < 0) {
FILE_OP_ERROR(tmp, "chmod");
- g_warning("can't change file mode\n");
+ g_warning("can't change file mode");
}
/* Save draft infos */
}
if (conv_convert(parser->conv, buf2, sizeof(buf2), buf) < 0) {
- g_warning("ertf_read_line(): code conversion failed\n");
+ g_warning("ertf_read_line(): code conversion failed");
index = parser->bufp - parser->buf->str;
len = (int)mailstream_ssl_get_certificate(stream, &cert_der);
if (cert_der == NULL || len < 0) {
- g_warning("no cert presented.\n");
+ g_warning("no cert presented");
return FALSE;
}
if (gnutls_x509_crt_import(cert, &tmp, GNUTLS_X509_FMT_DER) < 0) {
free(tmp.data);
- g_warning("IMAP: can't get cert\n");
+ g_warning("IMAP: can't get cert");
return FALSE;
} else if (ssl_certificate_check(cert, (guint)-1, host, port, accept_if_valid) == TRUE) {
free(tmp.data);
mbox = g_filename_from_utf8(utf8mbox, -1, NULL, NULL, NULL);
if (!mbox) {
- g_warning("export_ok_cb(): failed to convert character set.\n");
+ g_warning("export_ok_cb(): failed to convert character set.");
mbox = g_strdup(utf8mbox);
}
#ifndef USE_NEW_ADDRBOOK
if (!addressbook_peek_folder_exists(action->destination, &book, &folder)) {
- g_warning("addressbook folder not found '%s'\n", action->destination?action->destination:"(null)");
+ g_warning("addressbook folder not found '%s'", action->destination?action->destination:"(null)");
return FALSE;
}
if (!book) {
- g_warning("addressbook_peek_folder_exists returned NULL book\n");
+ g_warning("addressbook_peek_folder_exists returned NULL book");
return FALSE;
}
#else
if (!addressadd_selection(name, stripped_addr, NULL, NULL)) {
#endif
- g_warning("contact could not be added\n");
+ g_warning("contact could not be added");
errors++;
}
g_free(name);
g_slist_free(address_list);
end_address_completion();
} else {
- g_warning("header '%s' not set or empty\n", action->header?action->header:"(null)");
+ g_warning("header '%s' not set or empty", action->header?action->header:"(null)");
}
return (errors == 0);
}
account = account_find_from_id(atoi(attr->value));
if (!account)
- g_warning("account_id: %s not found\n", attr->value);
+ g_warning("account_id: %s not found", attr->value);
else {
folder->account = account;
account->folder = folder;
account = account_find_from_id(atoi(attr->value));
if (!account)
- g_warning("account_id: %s not found\n", attr->value);
+ g_warning("account_id: %s not found", attr->value);
else
item->account = account;
} else if (!strcmp(attr->name, "apply_sub")) {
xmlnode = node->data;
if (strcmp2(xmlnode->tag->tag, "folderlist") != 0) {
- g_warning("wrong folder list\n");
+ g_warning("wrong folder list");
xml_free_tree(node);
return -1;
}
if (xml_file_put_xml_decl(pfile->fp) < 0) {
prefs_file_close_revert(pfile);
- g_warning("failed to start write folder list.\n");
+ g_warning("failed to start write folder list.");
return;
}
tag = xml_tag_new("folderlist");
if (xml_write_tree(rootnode, pfile->fp) < 0) {
prefs_file_close_revert(pfile);
- g_warning("failed to write folder list.\n");
+ g_warning("failed to write folder list.");
} else if (prefs_file_close(pfile) < 0) {
- g_warning("failed to write folder list.\n");
+ g_warning("failed to write folder list.");
}
xml_free_tree(rootnode);
}
continue;
if (folder->klass->create_tree(folder) < 0) {
- g_warning("%s: can't create the folder tree.\n",
+ g_warning("%s: can't create the folder tree.",
LOCAL_FOLDER(folder)->rootpath);
continue;
}
cm_return_val_if_fail(folder != NULL, NULL);
if (strcmp2(xmlnode->tag->tag, "folderitem") != 0) {
- g_warning("tag name != \"folderitem\"\n");
+ g_warning("tag name != \"folderitem\"");
return NULL;
}
xmlnode = node->data;
if (strcmp2(xmlnode->tag->tag, "folder") != 0) {
- g_warning("tag name != \"folder\"\n");
+ g_warning("tag name != \"folder\"");
return NULL;
}
list = xmlnode->tag->attr;
node = gtk_cmctree_find_by_row_data(ctree, root, item);
if (!node)
- g_warning("%s not found.\n", item->path);
+ g_warning("%s not found.", item->path);
else {
parent = GTK_CMCTREE_ROW(node)->parent;
if (*prev && parent == GTK_CMCTREE_ROW(*prev)->parent)
source, strlen(source));
}
} else {
- g_warning("unknown info %d\n", info);
+ g_warning("unknown info %d", info);
}
}
tmp = conv_codeset_strdup(buf, src_codeset, dest_codeset);
if (!tmp) {
- g_warning("Failed to convert character set of action configuration\n");
+ g_warning("Failed to convert character set of action configuration");
tmp = g_strdup(buf);
}
wcs = g_utf8_to_ucs4(str, -1, &items_read, &items_written, &error);
if (error != NULL) {
- g_warning("An error occurred while converting a string from UTF-8 to UCS-4: %s\n",
+ g_warning("An error occurred while converting a string from UTF-8 to UCS-4: %s",
error->message);
g_error_free(error);
}
wcs = g_utf8_to_ucs4(str, -1, &items_read, &items_written, &error);
if (error != NULL) {
- g_warning("An error occurred while converting a string from UTF-8 to UCS-4: %s\n",
+ g_warning("An error occurred while converting a string from UTF-8 to UCS-4: %s",
error->message);
g_error_free(error);
}
xface[sizeof(xface) - 1] = '\0';
if (uncompface(xface) < 0) {
- g_warning("uncompface failed\n");
+ g_warning("uncompface failed");
return NULL;
}
if (!gdk_pixbuf_loader_write (loader, face_png, pngsize, &error) ||
!gdk_pixbuf_loader_close (loader, &error)) {
- g_warning("loading face failed\n");
+ g_warning("loading face failed");
g_object_unref(loader);
g_free(face_png);
return NULL;
if ((gdk_pixbuf_get_width(pixbuf) != 48) || (gdk_pixbuf_get_height(pixbuf) != 48)) {
g_object_unref(pixbuf);
- g_warning("wrong_size\n");
+ g_warning("wrong_size");
return NULL;
}
gtk_widget_set_style(btn_label, style);
#if !GTK_CHECK_VERSION(3, 0, 0)
} else
- g_warning("color allocation failed\n");
+ g_warning("color allocation failed");
#endif
g_signal_connect(G_OBJECT(btn), "enter",
if (success[i] == FALSE) {
GtkStyle *style;
- g_warning("LogWindow: color allocation failed\n");
+ g_warning("LogWindow: color allocation failed");
style = gtk_widget_get_style(logwin->window);
logwin->msg_color = logwin->warn_color =
logwin->error_color = logwin->in_color =
tmpp++;
attr_value = tmpp;
if ((p = strchr(attr_value, quote)) == NULL) {
- g_warning("sc_html_get_tag(): syntax error in tag: '%s'\n", str);
+ g_warning("sc_html_get_tag(): syntax error in tag: '%s'", str);
return tag;
}
tmpp = p;
ok = imap_select(session, IMAP_FOLDER(folder), item,
NULL, NULL, NULL, NULL, NULL, FALSE);
if (ok != MAILIMAP_NO_ERROR) {
- g_warning("can't select mailbox %s\n", item->path);
+ g_warning("can't select mailbox %s", item->path);
g_free(filename);
return NULL;
}
ok = imap_cmd_fetch(session, (guint32)uid, filename, headers, body);
if (ok != MAILIMAP_NO_ERROR) {
- g_warning("can't fetch message %d\n", uid);
+ g_warning("can't fetch message %d", uid);
g_free(filename);
return NULL;
}
&new_uid);
if (ok != MAILIMAP_NO_ERROR) {
- g_warning("can't append message %s\n", real_file);
+ g_warning("can't append message %s", real_file);
g_free(real_file);
g_free(destdir);
statusbar_progress_all(0,0,0);
msginfo = (MsgInfo *)msglist->data;
src = msginfo->folder;
if (!same_dest_ok && src == dest) {
- g_warning("the src folder is identical to the dest.\n");
+ g_warning("the src folder is identical to the dest.");
return -1;
}
new_item = imap_create_folder(folder, item, name);
if (!new_item) {
- g_warning("Can't create '%s'\n", name);
+ g_warning("Can't create '%s'", name);
if (!folder->inbox) return NULL;
new_item = imap_create_folder(folder, folder->inbox, name);
if (!new_item)
- g_warning("Can't create '%s' under INBOX\n", name);
+ g_warning("Can't create '%s' under INBOX", name);
else
new_item->stype = stype;
} else
g_free(path);
cache_dir = folder_item_get_path(item);
if (is_dir_exist(cache_dir) && remove_dir_recursive(cache_dir) < 0)
- g_warning("can't remove directory '%s'\n", cache_dir);
+ g_warning("can't remove directory '%s'", cache_dir);
g_free(cache_dir);
folder_item_remove(item);
return 0;
mailimap_mailbox_data_status_free(data_status);
if (got_values != mask) {
- g_warning("status: incomplete values received (%d)\n", got_values);
+ g_warning("status: incomplete values received (%d)", got_values);
}
return MAILIMAP_NO_ERROR;
}
gint ok = MAILIMAP_NO_ERROR;
oldpathlen = strlen(oldpath);
if (strncmp(oldpath, item->path, oldpathlen) != 0) {
- g_warning("path doesn't match: %s, %s\n", oldpath, item->path);
+ g_warning("path doesn't match: %s, %s", oldpath, item->path);
return TRUE;
}
ok = imap_set_message_flags(session, IMAP_FOLDER_ITEM(item),
data->msglist, flags_value, NULL, flags_set);
} else {
- g_warning("can't select mailbox %s\n", item->path);
+ g_warning("can't select mailbox %s", item->path);
}
if (!is_fatal(ok))
ok = imap_set_message_flags(session, IMAP_FOLDER_ITEM(item),
data->msglist, 0, &list, tags_set);
} else {
- g_warning("can't select mailbox %s\n", item->path);
+ g_warning("can't select mailbox %s", item->path);
}
if (!is_fatal(ok))
mbox = g_filename_from_utf8(utf8mbox, -1, NULL, NULL, NULL);
if (!mbox) {
- g_warning("import_ok_cb(): failed to convert character set.\n");
+ g_warning("import_ok_cb(): failed to convert character set.");
mbox = g_strdup(utf8mbox);
}
256, error_string_ret);
if (error_string_ret[0] || mainwin->smc_conn == NULL)
- g_warning ("While connecting to session manager:\n%s.",
+ g_warning ("While connecting to session manager: %s.",
error_string_ret);
else {
SmPropValue *vals;
if (item) {
g_ptr_array_add(folders, item);
} else {
- g_warning("no such folder: %s\n", buf);
+ g_warning("no such folder: %s", buf);
}
}
}
}
} else
- g_warning("invalid number of color elements (%d)\n", n);
+ g_warning("invalid number of color elements (%d)", n);
g_slist_free(sel);
/* reset "dont_toggle" state */
gdk_colormap_alloc_colors(colormap, color, 4, FALSE, TRUE, success);
for (i = 0; i < 4; i++) {
if (success[i] == FALSE)
- g_warning("MainWindow: color allocation %d failed\n", i);
+ g_warning("MainWindow: color allocation %d failed", i);
}
#endif
addressbook_dbus_open(FALSE, &error);
if (error) {
- g_warning("Failed to open address book");
- g_warning("%s", error->message);
+ g_warning("Failed to open address book: %s", error->message);
g_error_free(error);
}
#endif
MATCHER_RC, NULL);
if ((pfile = prefs_write_open(rcpath)) == NULL) {
- g_warning("failed to write configuration to file\n");
+ g_warning("failed to write configuration to file");
g_free(rcpath);
return;
}
g_free(rcpath);
if (prefs_matcher_save(pfile->fp) < 0) {
- g_warning("failed to write configuration to file\n");
+ g_warning("failed to write configuration to file");
prefs_file_close_revert(pfile);
} else if (prefs_file_close(pfile) < 0) {
- g_warning("failed to save configuration to file\n");
+ g_warning("failed to save configuration to file");
}
}
}
cond = NULL;
if (!disable_warnings)
- g_warning("filtering parsing: %i: %s\n",
+ g_warning("filtering parsing: %i: %s",
matcher_parserlineno, str);
error = 1;
}
{ \
lines++; \
if (fputs(s, tmp_fp) == EOF) { \
- g_warning("can't write to temporary file\n"); \
+ g_warning("can't write to temporary file"); \
fclose(tmp_fp); \
fclose(mbox_fp); \
claws_unlink(tmp_file); \
/* ignore empty lines on the head */
do {
if (fgets(buf, sizeof(buf), mbox_fp) == NULL) {
- g_warning("can't read mbox file.\n");
+ g_warning("can't read mbox file.");
fclose(mbox_fp);
return -1;
}
} while (buf[0] == '\n' || buf[0] == '\r');
if (strncmp(buf, "From ", 5) != 0) {
- g_warning("invalid mbox format: %s\n", mbox);
+ g_warning("invalid mbox format: %s", mbox);
fclose(mbox_fp);
return -1;
}
if ((tmp_fp = g_fopen(tmp_file, "wb")) == NULL) {
FILE_OP_ERROR(tmp_file, "fopen");
- g_warning("can't open temporary file\n");
+ g_warning("can't open temporary file");
fclose(mbox_fp);
g_free(tmp_file);
return -1;
/* warn if email part is empty (it's the minimum check
we can do */
if (lines == 0) {
- g_warning("malformed mbox: %s: message %d is empty\n", mbox, msgs);
+ g_warning("malformed mbox: %s: message %d is empty", mbox, msgs);
fclose(tmp_fp);
fclose(mbox_fp);
claws_unlink(tmp_file);
if (fclose(tmp_fp) == EOF) {
FILE_OP_ERROR(tmp_file, "fclose");
- g_warning("can't write to temporary file\n");
+ g_warning("can't write to temporary file");
fclose(mbox_fp);
claws_unlink(tmp_file);
g_free(tmp_file);
lockfile = g_strdup_printf("%s.%d", base, getpid());
if ((lockfp = g_fopen(lockfile, "wb")) == NULL) {
FILE_OP_ERROR(lockfile, "fopen");
- g_warning("can't create lock file %s\n", lockfile);
- g_warning("use 'flock' instead of 'file' if possible.\n");
+ g_warning("can't create lock file '%s', use 'flock' instead of 'file' if possible.", lockfile);
g_free(lockfile);
return -1;
}
while (link(lockfile, locklink) < 0) {
FILE_OP_ERROR(lockfile, "link");
if (retry >= 5) {
- g_warning("can't create %s\n", lockfile);
+ g_warning("can't create '%s'", lockfile);
claws_unlink(lockfile);
g_free(lockfile);
return -1;
}
if (retry == 0)
g_warning("mailbox is owned by another"
- " process, waiting...\n");
+ " process, waiting...");
retry++;
sleep(5);
}
{
#endif
#endif /* HAVE_FLOCK */
- g_warning("can't lock %s\n", base);
+ g_warning("can't lock %s", base);
if (close(lockfd) < 0)
perror("close");
return -1;
}
retval = lockfd;
} else {
- g_warning("invalid lock type\n");
+ g_warning("invalid lock type");
return -1;
}
{
#endif
#endif /* HAVE_FLOCK */
- g_warning("can't unlock %s\n", base);
+ g_warning("can't unlock %s", base);
if (close(fd) < 0)
perror("close");
return -1;
return 0;
}
- g_warning("invalid lock type\n");
+ g_warning("invalid lock type");
return -1;
}
if (change_file_mode_rw(dest_fp, dest) < 0) {
FILE_OP_ERROR(dest, "chmod");
- g_warning("can't change file mode\n");
+ g_warning("can't change file mode");
}
while ((n_read = read(srcfd, buf, sizeof(buf))) > 0) {
break;
}
if (fwrite(buf, 1, n_read, dest_fp) < n_read) {
- g_warning("writing to %s failed.\n", dest);
+ g_warning("writing to %s failed.", dest);
fclose(dest_fp);
claws_unlink(dest);
return -1;
}
if (save_errno != 0) {
- g_warning("error %d reading mbox: %s\n", save_errno,
+ g_warning("error %d reading mbox: %s", save_errno,
g_strerror(save_errno));
err = TRUE;
}
if ((fp = g_fopen(mbox, "wb")) == NULL) {
FILE_OP_ERROR(mbox, "fopen");
- g_warning("can't truncate mailbox to zero.\n");
+ g_warning("can't truncate mailbox to zero.");
return;
}
fclose(fp);
/* chmod for security */
if (change_file_mode_rw(fp, tmp) < 0) {
FILE_OP_ERROR(tmp, "chmod");
- g_warning("can't change file mode\n");
+ g_warning("can't change file mode");
}
addr = g_strdup(to);
queue = account_get_special_folder(account, F_QUEUE);
if (!queue) queue = folder_get_default_queue();
if (!queue) {
- g_warning("can't find queue folder\n");
+ g_warning("can't find queue folder");
claws_unlink(tmp);
return -1;
}
folder_item_scan(queue);
if ((num = folder_item_add_msg(queue, tmp, NULL, TRUE)) < 0) {
- g_warning("can't queue the message\n");
+ g_warning("can't queue the message");
claws_unlink(tmp);
return -1;
}
statuswindow_pop_all();
if (!file) {
- g_warning("can't get message file path.\n");
+ g_warning("can't get message file path.");
textview_show_error(messageview->mimeview->textview);
return -1;
}
file = procmsg_get_message_file_path(msginfo);
if (!file) {
- g_warning("can't get message file path.\n");
+ g_warning("can't get message file path.");
return;
}
addressbook_dbus_open(FALSE, &error);
if (error) {
- g_warning("Failed to open address book");
- g_warning("%s", error->message);
+ g_warning("Failed to open address book: %s", error->message);
g_error_free(error);
}
#endif
cm_return_val_if_fail(msginfo != NULL, -1);
if (msginfo->folder == dest) {
- g_warning("the src folder is identical to the dest.\n");
+ g_warning("the src folder is identical to the dest.");
return -1;
}
}
if (relation) {
if (g_hash_table_lookup(relation, msginfo) != NULL)
- g_warning("already in : %p", msginfo);
+ g_warning("already in: %p", msginfo);
g_hash_table_insert(relation, msginfo, GINT_TO_POINTER(dest->last_num+1));
}
{ \
if (!is_dir_exist(dir)) { \
if (is_file_exist(dir)) { \
- g_warning("File `%s' already exists.\n" \
+ g_warning("File '%s' already exists. " \
"Can't create folder.", dir); \
return -1; \
} \
path = folder_item_get_path(item);
if ((ret = remove_dir_recursive(path)) < 0) {
- g_warning("can't remove directory `%s'\n", path);
+ g_warning("can't remove directory '%s'", path);
g_free(path);
return ret;
}
real_path = item->path ? mh_filename_from_utf8(item->path) : g_strdup(".");
dir = g_dir_open(real_path, 0, &error);
if (!dir) {
- g_warning("failed to open directory '%s': %s (%d)\n",
+ g_warning("failed to open directory '%s': %s (%d)",
real_path, error->message, error->code);
g_error_free(error);
g_free(real_path);
oldpathlen = strlen(oldpath);
if (strncmp(oldpath, item->path, oldpathlen) != 0) {
- g_warning("path doesn't match: %s, %s\n", oldpath, item->path);
+ g_warning("path doesn't match: %s, %s", oldpath, item->path);
return TRUE;
}
gchar *real_path = g_filename_from_utf8(path, -1, NULL, NULL, NULL);
if (!real_path) {
- g_warning("mh_filename_from_utf8: failed to convert character set\n");
+ g_warning("mh_filename_from_utf8: failed to convert character set");
real_path = g_strdup(path);
}
{
gchar *utf8path = g_filename_to_utf8(path, -1, NULL, NULL, NULL);
if (!utf8path) {
- g_warning("mh_filename_to_utf8: failed to convert character set\n");
+ g_warning("mh_filename_to_utf8: failed to convert character set");
utf8path = g_strdup(path);
}
if (mimeinfo == NULL) {
/* message changed !? */
- g_warning("no more siginfo!\n");
+ g_warning("no more siginfo!");
goto end;
}
if (!mimeview->check_data) {
- g_warning("nothing to check\n");
+ g_warning("nothing to check");
return FALSE;
}
if (mimeview->check_data->siginfo != mimeinfo) {
/* message changed !? */
- g_warning("different siginfo!\n");
+ g_warning("different siginfo!");
goto end;
}
} else {
/* that's strange! we changed message without
* getting killed. */
- g_warning("different siginfo!\n");
+ g_warning("different siginfo!");
mimeview_check_data_reset(mimeview);
return NULL;
}
\
if ((ni = fread(&idata, sizeof(idata), 1, fp)) != 1) { \
g_warning("read_int: Cache data corrupted, read %zd of %zd at " \
- "offset %ld\n", ni, sizeof(idata), ftell(fp)); \
+ "offset %ld", ni, sizeof(idata), ftell(fp)); \
procmsg_msginfo_free(msginfo); \
error = TRUE; \
goto bail_err; \
WRITE_CACHE_DATA_INT(version, fp);
if (w_err != 0) {
- g_warning("failed to write int\n");
+ g_warning("failed to write int");
fclose(fp);
return NULL;
}
if ((ni = fread(&len, sizeof(len), 1, fp) != 1) ||
len > G_MAXINT) {
g_warning("read_data_str: Cache data (len) corrupted, read %zd "
- "of %zd bytes at offset %ld\n", ni, sizeof(len),
+ "of %zd bytes at offset %ld", ni, sizeof(len),
ftell(fp));
return -1;
}
if ((ni = fread(&len, sizeof(len), 1, fp) != 1) ||
bswap_32(len) > G_MAXINT) {
g_warning("read_data_str: Cache data (len) corrupted, read %zd "
- "of %zd bytes at offset %ld\n", ni, sizeof(len),
+ "of %zd bytes at offset %ld", ni, sizeof(len),
ftell(fp));
return -1;
}
if ((ni = fread(tmpstr, 1, len, fp)) != len) {
g_warning("read_data_str: Cache data corrupted, read %zd of %u "
- "bytes at offset %ld\n",
+ "bytes at offset %ld",
ni, len, ftell(fp));
g_free(tmpstr);
return -1;
return 0;
if(len > 2*1024*1024) {
- g_warning("read_data_str: refusing to allocate %d bytes.\n", len);
+ g_warning("read_data_str: refusing to allocate %d bytes.", len);
return -1;
}
}
if (w_err != 0) {
- g_warning("failed to write charset\n");
+ g_warning("failed to write charset");
if (write_fps.cache_fp)
fclose(write_fps.cache_fp);
claws_unlink(new_cache);
ok = news_get_article(folder,
num, filename);
if (ok != NEWSNNTP_NO_ERROR) {
- g_warning("can't read article %d\n", num);
+ g_warning("can't read article %d", num);
if (ok == NEWSNNTP_ERROR_STREAM) {
session_destroy(SESSION(session));
REMOTE_FOLDER(folder)->session = NULL;
}
if (change_file_mode_rw(tmpfp, tmp) < 0) {
FILE_OP_ERROR(tmp, "chmod");
- g_warning("can't change file mode\n");
+ g_warning("can't change file mode");
}
get_rfc822_date(buf, sizeof(buf));
path = folder_item_get_path(item);
if (remove_dir_recursive(path) < 0) {
- g_warning("can't remove directory `%s'\n", path);
+ g_warning("can't remove directory '%s'", path);
g_free(path);
return -1;
}
filename = procmsg_get_message_file_path(msginfo);
if (!filename) {
- g_warning("can't get message file path.\n");
+ g_warning("can't get message file path.");
return err;
}
tinfo = procheader_parse_file(filename, msginfo->flags, TRUE, TRUE);
return;
if (prefs_write_param(param, pref_file->fp) < 0) {
- g_warning("failed to write Archiver Plugin configuration\n");
+ g_warning("failed to write Archiver Plugin configuration");
prefs_file_close_revert(pref_file);
return;
}
return TRUE;
if (prefs_write_param(prefs, pref_file->fp) < 0) {
- g_warning("failed to write AttRemover Plugin configuration\n");
+ g_warning("failed to write AttRemover Plugin configuration");
prefs_file_close_revert(pref_file);
return TRUE;
}
&bogo_stdout, NULL, &error);
if (bogo_forked == FALSE) {
- g_warning("%s\n", error ? error->message:"ERROR???");
+ g_warning("%s", error ? error->message:"ERROR???");
g_error_free(error);
error = NULL;
status = -1;
memset(buf, 0, sizeof(buf));
/* get the result */
if (read(bogo_stdout, buf, sizeof(buf)-1) < 0) {
- g_warning("bogofilter short read\n");
+ g_warning("bogofilter short read");
debug_print("message %d is ham\n", msginfo->msgnum);
data->mail_filtering_data->unfiltered = g_slist_prepend(
data->mail_filtering_data->unfiltered, msginfo);
return;
if (prefs_write_param(param, pfile->fp) < 0) {
- g_warning("Failed to write Bogofilter configuration to file\n");
+ g_warning("Failed to write Bogofilter configuration to file");
prefs_file_close_revert(pfile);
return;
}
return;
if (prefs_write_param(param, pfile->fp) < 0) {
- g_warning("Failed to write Bsfilter configuration to file\n");
+ g_warning("Failed to write Bsfilter configuration to file");
prefs_file_close_revert(pfile);
return;
}
case VIRUS:
msg = g_strconcat(_("Detected %s virus."),
clamd_get_virus_name(buf.msg), NULL);
- g_warning("%s\n", msg);
+ g_warning("%s", msg);
debug_print("no_recv: %d\n", prefs_common_get_prefs()->no_recv_err_panel);
if (prefs_common_get_prefs()->no_recv_err_panel) {
statusbar_print_all("%s", msg);
return;
if (prefs_write_param(param, pfile->fp) < 0) {
- g_warning("failed to write Clamd configuration to file\n");
+ g_warning("failed to write Clamd configuration to file");
prefs_file_close_revert(pfile);
return;
}
return;
if (prefs_write_param(param, pref_file->fp) < 0) {
- g_warning("failed to write Fancy Plugin configuration\n");
+ g_warning("failed to write Fancy Plugin configuration");
prefs_file_close_revert(pref_file);
return;
}
/* Check that root entry is "gdata" */
if(strcmp2(xmlnode->tag->tag, "gdata") != 0) {
- g_warning("wrong gdata cache file\n");
+ g_warning("wrong gdata cache file");
xml_free_tree(rootnode);
return;
}
return NULL;
}
if(!S_ISREG(ss.st_mode)) {
- g_warning("mail file is not a regular file\n");
+ g_warning("mail file is not a regular file");
return NULL;
}
}
}
else {
- g_warning("cannot stat %s\n", fname);
+ g_warning("cannot stat '%s'", fname);
stats->errors++;
}
}
cm_return_if_fail(dir != NULL);
if ((dp = g_dir_open(dir, 0, &error)) == NULL) {
- g_warning("cannot open directory '%s': %s (%d)\n",
+ g_warning("cannot open directory '%s': %s (%d)",
dir, error->message, error->code);
g_error_free(error);
(*failed)++;
if (!is_dir_exist(fname)) {
if (claws_unlink(fname) < 0) {
- g_warning("couldn't delete file %s\n", fname);
+ g_warning("couldn't delete file '%s'", fname);
(acr->e_unlink)++;
}
else {
if (read_len == -1 &&
session->state == SESSION_DISCONNECTED) {
- g_warning ("sock_read: session disconnected\n");
+ g_warning ("sock_read: session disconnected");
if (session->io_tag > 0) {
g_source_remove(session->io_tag);
session->io_tag = 0;
}
if (read_len == 0) {
- g_warning("sock_read: received EOF\n");
+ g_warning("sock_read: received EOF");
session->state = SESSION_EOF;
return FALSE;
}
case EAGAIN:
return TRUE;
default:
- g_warning("sock_read: %s\n",
+ g_warning("sock_read: %s",
g_strerror(errno));
session->state = SESSION_ERROR;
return FALSE;
return;
if (prefs_write_param(prefs, pref_file->fp) < 0) {
- g_warning("failed to write ManageSieve Plugin configuration\n");
+ g_warning("failed to write ManageSieve Plugin configuration");
prefs_file_close_revert(pref_file);
return;
}
gdk_flush ();
if (gdk_error_trap_pop ()) {
- g_warning ("Binding '%s' failed!\n", binding->keystring);
+ g_warning ("Binding '%s' failed!", binding->keystring);
return FALSE;
}
/* Check that root entry is "foldercheckarray" */
if(strcmp2(xmlnode->tag->tag, "foldercheckarray") != 0) {
- g_warning("wrong foldercheck array file\n");
+ g_warning("wrong foldercheck array file");
xml_free_tree(rootnode);
return FALSE;
}
xmlnode = branchnode->data;
if(strcmp2(xmlnode->tag->tag, "branch") != 0) {
- g_warning("tag name != \"branch\"\n");
+ g_warning("tag name != \"branch\"");
return FALSE;
}
}
}
if((list == NULL) || (entry == NULL)) {
- g_warning("Did not find attribute \"name\" in tag \"branch\"\n");
+ g_warning("Did not find attribute \"name\" in tag \"branch\"");
continue; /* with next branch */
}
/* These should all be leaves. */
if(!G_NODE_IS_LEAF(node))
g_warning("Subnodes in \"branch\" nodes should all be leaves. "
- "Ignoring deeper subnodes..\n");
+ "Ignoring deeper subnodes.");
/* Check if tag is "folderitem" */
xmlnode = node->data;
if(strcmp2(xmlnode->tag->tag, "folderitem") != 0) {
- g_warning("tag name != \"folderitem\"\n");
+ g_warning("tag name != \"folderitem\"");
continue; /* to next node in branch */
}
}
if((list == NULL) || (item == NULL)) {
g_warning("Did not find attribute \"identifier\" in tag "
- "\"folderitem\"\n");
+ "\"folderitem\"");
continue; /* with next leaf node */
}
PopplerDest *dest = poppler_document_find_dest(
viewer->pdf_doc, action->goto_dest.dest->named_dest);
if (dest->type != POPPLER_DEST_XYZ) {
- g_warning("couldn't figure out link\n");
+ g_warning("couldn't figure out link");
poppler_dest_free(dest);
continue;
}
#endif
else {
#ifdef HAVE_POPPLER_DEST_NAMED
- g_warning("unhandled link type %d\nplease contact developers\n", action->goto_dest.dest->type);
+ g_warning("unhandled link type %d. please contact developers", action->goto_dest.dest->type);
#else
- g_warning("unhandled link type %d\nplease upgrade libpoppler-glib to 0.5.4\n", action->goto_dest.dest->type);
+ g_warning("unhandled link type %d. please upgrade libpoppler-glib to 0.5.4", action->goto_dest.dest->type);
#endif
continue;
}
dest = poppler_document_find_dest(
viewer->pdf_doc, viewer->link_action->goto_dest.dest->named_dest);
if (dest->type != POPPLER_DEST_XYZ) {
- g_warning("couldn't figure out link\n");
+ g_warning("couldn't figure out link");
poppler_dest_free(dest);
break;
}
dest = poppler_document_find_dest(
viewer->pdf_doc, viewer->link_action->goto_remote.dest->named_dest);
if (dest->type != POPPLER_DEST_XYZ) {
- g_warning ("couldn't figure out link\n");
+ g_warning ("couldn't figure out link");
poppler_dest_free(dest);
break;
}
g_free(tmp);
}
else {
- g_warning("gs conversion failed: %s returned %d\n", cmdline, result);
+ g_warning("gs conversion failed: %s returned %d", cmdline, result);
tmp = g_strdup_printf("gs: err %d", result);
alertpanel_warning("%s", tmp);
g_free(tmp);
g_free(tmpfile);
}
else {
- g_warning("gs conversion disabled: gs binary was not found\n");
+ g_warning("gs conversion disabled: gs binary was not found");
alertpanel_warning("PostScript view disabled: required gs program not found");
result = 1;
viewer->pdf_page = poppler_document_get_page(viewer->pdf_doc, page_num - 1);
if (viewer->pdf_page == NULL) {
- g_warning("Page not found\n");
+ g_warning("Page not found");
return;
}
gdkwin, NULL, GDK_CURRENT_TIME))) {
if (err == GDK_GRAB_NOT_VIEWABLE && cnt < 10) {
cnt++;
- g_warning("trying to grab mouse again\n");
+ g_warning("trying to grab mouse again");
gtk_main_iteration();
goto try_again;
} else {
- g_warning("OOPS: Could not grab mouse\n");
+ g_warning("OOPS: Could not grab mouse");
gtk_widget_destroy(window);
return NULL;
}
if (gdk_keyboard_grab(gdkwin, FALSE, GDK_CURRENT_TIME)) {
gdk_display_pointer_ungrab(gdk_display_get_default(),
GDK_CURRENT_TIME);
- g_warning("OOPS: Could not grab keyboard\n");
+ g_warning("OOPS: Could not grab keyboard");
gtk_widget_destroy(window);
return NULL;
}
return;
if (prefs_write_param(param, pfile->fp) < 0) {
- g_warning("failed to write GPG configuration to file\n");
+ g_warning("failed to write GPG configuration to file");
prefs_file_close_revert(pfile);
return;
}
break;
default:
confstr = g_strdup("");
- g_warning("prefs_gpg_account_set_config: bad sign_key val\n");
+ g_warning("prefs_gpg_account_set_config: bad sign_key val");
}
prefs_account_set_privacy_prefs(account, "gpg", confstr);
if (found_key != NULL) {
gpgme_key_release(key);
gpgme_op_keylist_end(ctx);
- g_warning("ambiguous specification of secret key '%s'\n", keyid);
+ g_warning("ambiguous specification of secret key '%s'", keyid);
privacy_set_error(_("Secret key specification is ambiguous"));
goto bail;
}
gpgme_key_release(found_key);
if (err) {
- g_warning("error adding secret key: %s\n",
+ g_warning("error adding secret key: %s",
gpgme_strerror(err));
privacy_set_error(_("Error setting secret key: %s"),
gpgme_strerror(err));
while ((r = gpgme_data_read(data, buf, BUFSIZ)) > 0) {
void *rresult = realloc(result, r + w);
if (rresult == NULL) {
- g_warning("can't allocate memory\n");
+ g_warning("can't allocate memory");
if (result != NULL)
free(result);
return NULL;
conv_get_locale_charset_str_no_utf8());
}
if (!tmp) {
- g_warning("Can't convert charset to anything sane\n");
+ g_warning("Can't convert charset to anything sane");
tmp = conv_codeset_strdup(textdata, CS_UTF_8, CS_US_ASCII);
}
g_free(textdata);
g_file_get_contents(path, &contents, NULL, &error);
if( error ) {
- g_warning("GError: '%s'\n", error->message);
+ g_warning("GError: '%s'", error->message);
g_error_free(error);
}
if( contents != NULL ) {
lines = strsplit_no_copy(contents, '\n');
} else {
- g_warning("Badly formatted file found, ignoring: '%s'\n", path);
+ g_warning("Badly formatted file found, ignoring: '%s'", path);
return NULL;
}
if( !is_dir_exist(rssyl_dir) ) {
if( make_dir(rssyl_dir) < 0 ) {
- g_warning("couldn't create directory %s\n", rssyl_dir);
+ g_warning("couldn't create directory %s", rssyl_dir);
}
debug_print("RSSyl: created directory %s\n", rssyl_dir);
oldpathlen = strlen(oldpath);
if (strncmp(oldpath, item->path, oldpathlen) != 0) {
- g_warning("path doesn't match: %s, %s\n", oldpath, item->path);
+ g_warning("path doesn't match: %s, %s", oldpath, item->path);
return TRUE;
}
path = folder_item_get_path(item);
if( remove_dir_recursive(path) < 0 ) {
- g_warning("can't remove directory '%s'\n", path);
+ g_warning("can't remove directory '%s'", path);
g_free(path);
return -1;
}
debug_print("RSSyl: add_msgs: new filename is '%s'\n", destfile);
if( copy_file(fileinfo->file, destfile, TRUE) < 0 ) {
- g_warning("can't copy message %s to %s\n", fileinfo->file, destfile);
+ g_warning("can't copy message %s to %s", fileinfo->file, destfile);
g_free(destfile);
return -1;
}
template = g_strconcat(dirname, G_DIR_SEPARATOR_S,
RSSYL_TMP_TEMPLATE, NULL);
if ((fd = g_mkstemp(template)) < 0) {
- g_warning("Couldn't g_mkstemp('%s'), not adding message!\n", template);
+ g_warning("Couldn't g_mkstemp('%s'), not adding message!", template);
g_free(dirname);
g_free(template);
return;
f = fdopen(fd, "w");
if (f == NULL) {
- g_warning("Couldn't open file '%s', not adding message!\n", template);
+ g_warning("Couldn't open file '%s', not adding message!", template);
g_free(dirname);
g_free(template);
return;
n = folder_item_get_path(item);
if( remove_dir_recursive(n) < 0 ) {
- g_warning("can't remove directory '%s'\n", n);
+ g_warning("can't remove directory '%s'", n);
g_free(n);
return;
}
g_file_get_contents(deleted_file, &contents, NULL, &error);
if (error) {
- g_warning("GError: '%s'\n", error->message);
+ g_warning("GError: '%s'", error->message);
g_error_free(error);
}
if (contents != NULL) {
lines = strsplit_no_copy(contents, '\n');
} else {
- g_warning("Couldn't read '%s', ignoring\n", deleted_file);
+ g_warning("Couldn't read '%s', ignoring", deleted_file);
g_free(deleted_file);
return NULL;
}
return;
if( prefs_write_param(param, pref_file->fp) < 0 ) {
- g_warning("Failed to write RSSyl plugin configuration\n");
+ g_warning("Failed to write RSSyl plugin configuration");
prefs_file_close_revert(pref_file);
return;
}
enccontent = sgpgme_data_release_and_get_mem(gpgenc, &len);
if (!enccontent) {
- g_warning("no enccontent\n");
+ g_warning("no enccontent");
return FALSE;
}
}
break;
default:
- g_warning("Unknown method\n");
+ g_warning("Unknown method");
}
g_free(reqbody);
g_free(geturl);
return;
if (prefs_write_param(param, pref_file->fp) < 0) {
- g_warning("failed to write SpamReport Plugin configuration\n");
+ g_warning("failed to write SpamReport Plugin configuration");
prefs_file_close_revert(pref_file);
return;
}
return;
if (prefs_write_param(param, pfile->fp) < 0) {
- g_warning("Failed to write SpamAssassin configuration to file\n");
+ g_warning("Failed to write SpamAssassin configuration to file");
prefs_file_close_revert(pfile);
return;
}
gdk_colormap_alloc_color(pic1_cmap, &dw->bg2, FALSE, TRUE);
if (!gdk_color_parse("white", &dw->line_color)) {
+ g_warning("color parse failed: white");
dw->line_color.red = 239 * (65535/255);
dw->line_color.green = 235 * (65535/255);
dw->line_color.blue = 230 * (65535/255);
}
if (!gdk_color_parse("blue", &dw->fg_sunday)) {
- g_warning("color parse failed: red\n");
+ g_warning("color parse failed: blue");
dw->fg_sunday.red = 10 * (65535/255);
dw->fg_sunday.green = 10 * (65535/255);
dw->fg_sunday.blue = 255 * (65535/255);
}
if (!gdk_color_parse("gold", &dw->bg_today)) {
- g_warning("color parse failed: gold\n");
+ g_warning("color parse failed: gold");
dw->bg_today.red = 255 * (65535/255);
dw->bg_today.green = 215 * (65535/255);
dw->bg_today.blue = 115 * (65535/255);
gdk_colormap_alloc_color(pic1_cmap, &mw->bg2, FALSE, TRUE);
if (!gdk_color_parse("white", &mw->line_color)) {
+ g_warning("color parse failed: white");
mw->line_color.red = 239 * (65535/255);
mw->line_color.green = 235 * (65535/255);
mw->line_color.blue = 230 * (65535/255);
}
if (!gdk_color_parse("blue", &mw->fg_sunday)) {
- g_warning("color parse failed: red\n");
+ g_warning("color parse failed: blue");
mw->fg_sunday.red = 10 * (65535/255);
mw->fg_sunday.green = 10 * (65535/255);
mw->fg_sunday.blue = 255 * (65535/255);
}
if (!gdk_color_parse("gold", &mw->bg_today)) {
- g_warning("color parse failed: gold\n");
+ g_warning("color parse failed: gold");
mw->bg_today.red = 255 * (65535/255);
mw->bg_today.green = 215 * (65535/255);
mw->bg_today.blue = 115 * (65535/255);
curl_easy_getinfo(curl_ctx, CURLINFO_RESPONSE_CODE, &response_code);
if (response_code < 200 || response_code >= 300) {
- g_warning("Can't export calendar, got code %ld\n", response_code);
+ g_warning("Can't export calendar, got code %ld", response_code);
res = FALSE;
}
curl_easy_cleanup(curl_ctx);
icalcomponent *cal = NULL;
if (root == NULL) {
- g_warning("can't get root folder\n");
+ g_warning("can't get root folder");
g_free(feed);
if (error)
g_free(error);
t = time(NULL) + (86400*7);
t_subject = _("Later");
} else {
- g_warning("unknown spec date\n");
+ g_warning("unknown spec date");
return NULL;
}
xml_free_tree(rootnode);
if (prefs_file_close(pfile) < 0) {
- g_warning("failed to write event.\n");
+ g_warning("failed to write event.");
return;
}
xmlnode = node->data;
if (strcmp2(xmlnode->tag->tag, "event") != 0) {
- g_warning("tag name != \"event\"\n");
+ g_warning("tag name != \"event\"");
return NULL;
}
xmlnode = node->data;
if (strcmp2(xmlnode->tag->tag, "answer") != 0) {
- g_warning("tag name != \"answer\"\n");
+ g_warning("tag name != \"answer\"");
return event;
}
list = xmlnode->tag->attr;
g_free(path);
if (!node) {
- g_warning("no node\n");
+ g_warning("no node");
return NULL;
}
folderitem = account_get_special_folder(account, F_QUEUE);
if (!folderitem) {
- g_warning("can't find queue folder for %s\n", account->address);
+ g_warning("can't find queue folder for %s", account->address);
g_unlink(tmpfile);
g_free(tmpfile);
return FALSE;
folder_item_scan(folderitem);
if ((msgnum = folder_item_add_msg(folderitem, tmpfile, NULL, TRUE)) < 0) {
- g_warning("can't queue the message\n");
+ g_warning("can't queue the message");
g_unlink(tmpfile);
g_free(tmpfile);
return FALSE;
num_format++;
}
if (num_format > 2) {
- g_warning("wrong format in %s!\n", real_url);
+ g_warning("wrong format in %s!", real_url);
g_free(real_url);
return FALSE;
}
}
if (str_write_to_file(icalcomponent_as_ical_string(calendar), internal_file) < 0) {
- g_warning("can't export internal cal\n");
+ g_warning("can't export internal cal");
}
g_free(internal_file);
icalcomponent_add_component(calendar, vfreebusy);
if (str_write_to_file(icalcomponent_as_ical_string(calendar), internal_file) < 0) {
- g_warning("can't export freebusy\n");
+ g_warning("can't export freebusy");
}
g_free(internal_file);
return;
if (prefs_write_param(param, pfile->fp) < 0) {
- g_warning("failed to write Vcalendar configuration to file\n");
+ g_warning("failed to write vCalendar configuration to file");
prefs_file_close_revert(pfile);
return;
}
charset = CS_WINDOWS_1252;
if (!vcalviewer->event->answers || g_slist_length(vcalviewer->event->answers) > 1) {
- g_warning("strange, no answers or more than one\n");
+ g_warning("strange, no answers or more than one");
}
if (vcalviewer->event->answers) {
s_vcalviewer = vcalviewer;
if (!vcalviewer->event) {
- g_warning("can't get event\n");
+ g_warning("can't get event");
return TRUE;
}
if (event->organizer && *(event->organizer) &&
!vcal_manager_reply(account, event)) {
- g_warning("couldn't send reply\n");
+ g_warning("couldn't send reply");
} else {
debug_print("no organizer, not sending answer\n");
}
#define TRY(func) \
if (!(func)) \
{ \
- g_warning("failed to write\n"); \
+ g_warning("failed to write"); \
goto err_write; \
} \
if ((cur > prev && fwrite(prev, 1, cur - prev, fp) < 1) ||
fputc('\n', fp) == EOF) {
FILE_OP_ERROR(file, "fwrite");
- g_warning("can't write to file: %s\n", file);
+ g_warning("can't write to file: %s", file);
fclose(fp);
claws_unlink(file);
return -1;
if (prev - data < len &&
fwrite(prev, 1, len - (prev - data), fp) < 1) {
FILE_OP_ERROR(file, "fwrite");
- g_warning("can't write to file: %s\n", file);
+ g_warning("can't write to file: %s", file);
fclose(fp);
claws_unlink(file);
return -1;
if (data[len - 1] != '\r' && data[len - 1] != '\n') {
if (fputc('\n', fp) == EOF) {
FILE_OP_ERROR(file, "fputc");
- g_warning("can't write to file: %s\n", file);
+ g_warning("can't write to file: %s", file);
fclose(fp);
claws_unlink(file);
return -1;
hookdata->password = NULL;
if (!g_list_find(account_get_list(), account)) {
- g_warning("can't find sock account\n");
+ g_warning("can't find account");
return TRUE;
}
*ac_prefs = tmp_ac_prefs;
while (*p && !g_ascii_isdigit(*p)) p++;
id = atoi(p);
- if (id < 0) g_warning("wrong account id: %d\n", id);
+ if (id < 0) g_warning("wrong account id: %d", id);
ac_prefs->account_id = id;
if (ac_prefs->protocol == A_APOP) {
#define WRITE_PARAM(PARAM_TABLE) \
if (prefs_write_param(PARAM_TABLE, pfile->fp) < 0) { \
- g_warning("failed to write configuration to file\n"); \
+ g_warning("failed to write configuration to file"); \
prefs_file_close_revert(pfile); \
g_free(privacy_prefs); \
privacy_prefs = NULL; \
}
if (prefs_file_close(pfile) < 0)
- g_warning("failed to write configuration to file\n");
+ g_warning("failed to write configuration to file");
}
#undef WRITE_PARAM
tmp = conv_codeset_strdup(buf, src_codeset, dest_codeset);
if (!tmp) {
- g_warning("Failed to convert character set of action configuration\n");
+ g_warning("Failed to convert character set of action configuration");
tmp = g_strdup(buf);
}
rcpath = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, ACTIONS_RC, NULL);
if ((pfile= prefs_write_open(rcpath)) == NULL) {
- g_warning("Failed to write configuration to file\n");
+ g_warning("failed to write configuration to file");
g_free(rcpath);
return;
}
act = conv_codeset_strdup(tmp, src_codeset, dest_codeset);
if (!act) {
- g_warning("Failed to convert character set of action configuration\n");
+ g_warning("Failed to convert character set of action configuration");
act = g_strdup(act);
}
g_free(rcpath);
if (prefs_file_close(pfile) < 0) {
- g_warning("failed to write configuration to file\n");
+ g_warning("failed to write configuration to file");
return;
}
}
#define TRY(func) \
if (!(func)) \
{ \
- g_warning("failed to write\n"); \
+ g_warning("failed to write"); \
goto out; \
} \
}
if ((pfile = prefs_write_open(rcpath)) == NULL) {
- g_warning("failed to write configuration to file\n");
+ g_warning("failed to write configuration to file");
g_free(rcpath);
return;
}
}
if (prefs_file_close(pfile) < 0) {
- g_warning("failed to write configuration to file\n");
+ g_warning("failed to write configuration to file");
return;
}
}
DISPLAY_HEADER_RC, NULL);
if ((pfile = prefs_write_open(rcpath)) == NULL) {
- g_warning("failed to write configuration to file\n");
+ g_warning("failed to write configuration to file");
g_free(rcpath);
return;
}
g_free(rcpath);
if (prefs_file_close(pfile) < 0) {
- g_warning("failed to write configuration to file\n");
+ g_warning("failed to write configuration to file");
return;
}
}
ACTION_CLEAR_TAGS);
break;
default:
- g_warning("unhandled case !\n");
+ g_warning("unhandled action type");
}
if (action->destination)
gtk_entry_set_text(GTK_ENTRY(filtering_action.dest_entry), action->destination);
pos = prefs_common.folder_col_pos[type];
if (pos < 0 || pos >= N_FOLDER_COLS ||
state[pos].type != -1) {
- g_warning("Wrong column position\n");
+ g_warning("Wrong column position");
prefs_folder_column_set_config(default_state);
return default_state;
}
cm_return_if_fail(rcfile != NULL);
if (encoding != NULL)
- g_warning("Encoding is ignored\n");
+ g_warning("Encoding is ignored");
debug_print("Reading configuration...\n");
#define TRY(func) \
if (!(func)) \
{ \
- g_warning("Failed to write configuration to file\n"); \
+ g_warning("Failed to write configuration to file"); \
if (orig_fp) fclose(orig_fp); \
prefs_file_close_revert(pfile); \
g_free(rcpath); \
}
if ((pfile = prefs_write_open(rcpath)) == NULL) {
- g_warning("Failed to write configuration to file\n");
+ g_warning("Failed to write configuration to file");
if (orig_fp) fclose(orig_fp);
g_free(rcpath);
return;
if (orig_fp) fclose(orig_fp);
if (prefs_file_close(pfile) < 0)
- g_warning("Failed to write configuration to file\n");
+ g_warning("Failed to write configuration to file");
g_free(rcpath);
debug_print("Configuration is saved.\n");
*((gint *)pparam->data) = atoi(entry_str);
break;
default:
- g_warning("Invalid PrefType for GtkEntry widget: %d\n",
+ g_warning("Invalid PrefType for GtkEntry widget: %d",
pparam->type);
}
}
*str = pref_get_pref_from_entry(GTK_ENTRY(*pparam->widget));
break;
default:
- g_warning("Invalid escaped PrefType for GtkEntry widget: %d\n",
+ g_warning("Invalid escaped PrefType for GtkEntry widget: %d",
pparam->type);
}
}
itos(*((gushort *)pparam->data)));
break;
default:
- g_warning("Invalid PrefType for GtkEntry widget: %d\n",
+ g_warning("Invalid PrefType for GtkEntry widget: %d",
pparam->type);
}
}
*str ? *str : "");
break;
default:
- g_warning("Invalid escaped PrefType for GtkEntry widget: %d\n",
+ g_warning("Invalid escaped PrefType for GtkEntry widget: %d",
pparam->type);
}
}
g_free(text);
break;
default:
- g_warning("Invalid PrefType for GtkText widget: %d\n",
+ g_warning("Invalid PrefType for GtkText widget: %d",
pparam->type);
}
}
*str = pref_get_pref_from_textview(GTK_TEXT_VIEW(*pparam->widget));
break;
default:
- g_warning("Invalid escaped PrefType for GtkText widget: %d\n",
+ g_warning("Invalid escaped PrefType for GtkText widget: %d",
pparam->type);
}
}
gtk_text_buffer_insert(buffer, &iter, buf, -1);
break;
default:
- g_warning("Invalid PrefType for GtkTextView widget: %d\n",
+ g_warning("Invalid PrefType for GtkTextView widget: %d",
pparam->type);
}
}
*str ? *str : "");
break;
default:
- g_warning("Invalid escaped PrefType for GtkTextView widget: %d\n",
+ g_warning("Invalid escaped PrefType for GtkTextView widget: %d",
pparam->type);
}
}
(GTK_SPIN_BUTTON(*pparam->widget));
break;
default:
- g_warning("Invalid PrefType for GtkSpinButton widget: %d\n",
+ g_warning("Invalid PrefType for GtkSpinButton widget: %d",
pparam->type);
}
}
(gfloat)*((gushort *)pparam->data));
break;
default:
- g_warning("Invalid PrefType for GtkSpinButton widget: %d\n",
+ g_warning("Invalid PrefType for GtkSpinButton widget: %d",
pparam->type);
}
}
sections_table = g_hash_table_lookup(whole_cache, rcfile);
if (sections_table == NULL) {
- g_warning("Can't find %s in the whole cache\n", rcfile?rcfile:"(null)");
+ g_warning("Can't find %s in the whole cache", rcfile?rcfile:"(null)");
return FALSE;
}
values_table = g_hash_table_lookup(sections_table, label);
rgbvalue = prefs_common.color_new;
} else {
/* Should never be called */
- g_warning("Unrecognized datatype '%s' in quote_color_set_dialog\n", type);
+ g_warning("Unrecognized datatype '%s' in quote_color_set_dialog", type);
return;
}
}
pos = prefs_common.summary_col_pos[type];
if (pos < 0 || pos >= N_SUMMARY_COLS ||
state[pos].type != -1) {
- g_warning("Wrong column position\n");
+ g_warning("Wrong column position");
prefs_summary_column_set_config(default_state);
return default_state;
}
base = g_path_get_basename(filename);
if (TRUE == is_dir_exist(filename)) {
if (strcmp(base, ".") != 0 && strcmp(base, "..") != 0)
- g_warning("prefs_themes_file_remove(): subdir in theme dir skipped: '%s'.\n",
+ g_warning("prefs_themes_file_remove(): subdir in theme dir skipped: '%s'.",
base);
}
else if (0 != claws_unlink(filename)) {
base = g_path_get_basename(filename);
if (TRUE == is_dir_exist(filename)) {
if (strcmp(base, ".") != 0 && strcmp(base, "..") !=0 )
- g_warning("prefs_themes_file_install(): subdir in theme dir skipped: '%s'.\n",
+ g_warning("prefs_themes_file_install(): subdir in theme dir skipped: '%s'.",
base);
}
else {
if (procheader_scan_date_string(src, weekday, &day, month, &year,
&hh, &mm, &ss, zone) < 0) {
- g_warning("Invalid date: %s\n", src);
+ g_warning("Invalid date: %s", src);
return FALSE;
}
if ((p = strstr(monthstr, month)) != NULL)
dmonth = (gint)(p - monthstr) / 3 + 1;
else {
- g_warning("Invalid month: %s\n", month);
+ g_warning("Invalid month: %s", month);
dmonth = G_DATE_BAD_MONTH;
}
}
starting = FALSE;
if (((inread != inlen) || len < 0) && !got_error) {
- g_warning("Bad BASE64 content.\n");
+ g_warning("Bad BASE64 content.");
if (SC_FWRITE(_("[Error decoding BASE64]\n"),
sizeof(gchar),
strlen(_("[Error decoding BASE64]\n")),
len = fromuutobits(outbuf, buf);
if (len <= 0) {
if (len < 0)
- g_warning("Bad UUENCODE content(%d)\n", len);
+ g_warning("Bad UUENCODE content (%d)", len);
break;
}
if (SC_FWRITE(outbuf, sizeof(gchar), len, outfp) < len)
if (mimeinfo->content == MIMECONTENT_FILE && mimeinfo->data.filename) {
if ((infp = procmime_fopen(mimeinfo->data.filename, "rb")) == NULL) {
- g_warning("Can't open file %s\n", mimeinfo->data.filename);
+ g_warning("Can't open file %s", mimeinfo->data.filename);
procmime_fclose(outfp);
return FALSE;
}
}
if (conv_fail)
- g_warning("procmime_get_text_content(): Code conversion failed.\n");
+ g_warning("procmime_get_text_content(): Code conversion failed.");
procmime_fclose(tmpfp);
claws_unlink(tmpfile);
procmime_fclose(fp);
if (!list)
- g_warning("Can't read mime.types\n");
+ g_warning("Can't read mime.types");
return list;
}
if (procmsg_send_message_queue_full(file,
!procmsg_is_last_for_account(queue, msginfo, elem),
errstr, queue, msginfo->msgnum, &queued_removed) < 0) {
- g_warning("Sending queued message %d failed.\n",
+ g_warning("Sending queued message %d failed.",
msginfo->msgnum);
err++;
} else {
folder_item_scan(outbox);
if ((num = folder_item_add_msg(outbox, tmp, &flag, TRUE)) < 0) {
- g_warning("can't save message\n");
+ g_warning("can't save message");
claws_unlink(tmp);
return -1;
}
folder_item_scan(outbox);
if ((num = folder_item_add_msg
(outbox, file, &flag, FALSE)) < 0) {
- g_warning("can't save message\n");
+ g_warning("can't save message");
return -1;
}
}
if (msginfo == NULL) return NULL;
if (!file || !is_file_exist(file)) {
- g_warning("procmsg_msginfo_get_full_info_from_file(): can't get message file.\n");
+ g_warning("procmsg_msginfo_get_full_info_from_file(): can't get message file.");
return NULL;
}
file = procmsg_get_message_file(msginfo);
}
if (!file || !is_file_exist(file)) {
- g_warning("procmsg_msginfo_get_full_info(): can't get message file.\n");
+ g_warning("procmsg_msginfo_get_full_info(): can't get message file.");
return NULL;
}
mailac = account_find_from_smtp_server(from, smtpserver);
if (!mailac) {
g_warning("Account not found. "
- "Using current account...\n");
+ "Using current account...");
mailac = cur_account;
}
}
} else {
PrefsAccount tmp_ac;
- g_warning("Account not found.\n");
+ g_warning("Account not found.");
memset(&tmp_ac, 0, sizeof(PrefsAccount));
tmp_ac.address = from;
} else {
if (change_file_mode_rw(tmpfp, tmp) < 0) {
FILE_OP_ERROR(tmp, "chmod");
- g_warning("can't change file mode\n");
+ g_warning("can't change file mode");
}
while ((newsval == 0) && fgets(buf, sizeof(buf), fp) != NULL) {
{
stacksize--;
if (stacksize < 0) {
- g_warning("Error: visibility stack underflow\n");
+ g_warning("Error: visibility stack underflow");
stacksize = 0;
}
}
gchar *quote_fmt_get_buffer(void)
{
if (current != &main_expr)
- g_warning("Error: parser still in sub-expr mode\n");
+ g_warning("Error: parser still in sub-expr mode");
if (error != 0)
return NULL;
void quote_fmterror(char *str)
{
- g_warning("Error: %s at line %d\n", str, line);
+ g_warning("Error: %s at line %d", str, line);
error = 1;
}
}
if (fp == NULL)
- g_warning("Can't get text part\n");
+ g_warning("Can't get text part");
else {
while (fgets(buf, sizeof(buf), fp) != NULL) {
strcrchomp(buf);
state_str = _("Quitting");
break;
case SMTP_ERROR:
- g_warning("send: error: %s\n", msg);
+ g_warning("send: error: %s", msg);
return 0;
default:
return 0;
if (!path) return FALSE;
if (folder_find_from_path(path)) {
- g_warning("The mailbox already exists.\n");
+ g_warning("The mailbox already exists.");
return FALSE;
}
chg->unset_flags, chg->unset_tmp_flags);
break;
default:
- g_warning("shouldn't happen\n");
+ g_warning("unknown change op");
}
g_free(chg);
}
}
}
} else
- g_warning("invalid number of color elements (%d)\n", n);
+ g_warning("invalid number of color elements (%d)", n);
/* reset "dont_toggle" state */
g_object_set_data(G_OBJECT(menu), "dont_toggle",
return;
}
if (error != NULL) {
- g_warning("%s\n", error->message);
+ g_warning("%s", error->message);
g_error_free(error);
}
if (!pixbuf) {
last->bp = (bp_); last->ep = (ep_); last->pti = (pti_); \
last->next = NULL; \
} else { \
- g_warning("alloc error scanning URIs\n"); \
+ g_warning("alloc error scanning URIs"); \
gtk_text_buffer_insert_with_tags_by_name(buffer, &iter, \
linebuf, -1, \
fg_tag, NULL); \
last->bp = (bp_); last->ep = (ep_); last->pti = (pti_); \
last->next = NULL; \
} else { \
- g_warning("alloc error scanning URIs\n"); \
+ g_warning("alloc error scanning URIs"); \
}
/* textview_make_clickable_parts() - colorizes clickable parts */
g_free( fileSpec );
if (prefs_file_close (pfile) < 0 )
- g_warning("failed to write toolbar configuration to file\n");
+ g_warning("failed to write toolbar configuration to file");
return;
fail:
g_free( fileSpec );
prefs_file_close_revert (pfile);
} else
- g_warning("failed to open toolbar configuration file for writing\n");
+ g_warning("failed to open toolbar configuration file for writing");
}
void toolbar_read_config_file(ToolbarType source)
else if (source == TOOLBAR_MSGVIEW)
toolbar_set_default(TOOLBAR_MSGVIEW);
else {
- g_warning("refusing to write unknown Toolbar Configuration number %d\n", source);
+ g_warning("refusing to write unknown Toolbar Configuration number %d", source);
return;
}
mainwin = (MainWindow*)toolbar_item->parent;
break;
default:
- g_warning("wrong toolbar type\n");
+ g_warning("wrong toolbar type");
return;
}