I spent most of my day working on my CShare project.
Somewhere in the middle of the afternoon I’ve started having a problem: GCC keeps saying to me that a variable is unused. The code with the problem follows:
gint cshare_send(gchar *path, GIOChannel *channel) {
gint ok = 0;
struct stat file_info;
(...)
if(!access(path, R_OK)) {
/* path is a file */
if(g_file_test(path, G_FILE_TEST_IS_REGULAR)) {struct stat file_info;
g_stat(path, &file_info);
ok = cshare_send_file(path, file_info.st_size, channel);
}
(...)
The variable unused was file_info. I needed almost 1 hour to figure out the problem… Shame on me… Maybe you can do best :)