GCC sucks

Published at Mon 26, 2007 20:20 | Permalink Permalink | Comments Comments (0) | Trackbacks Trackbacks (0)

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 :)

On the 24 6×12 episode, you can hear this from the best technicians from CTU:

What is this? (Pointing to a weird text appearing on screen)

It’s ASCII text!

It is?

Yes! In RUSSIAN!!

I don’t believe they really made this error…

ETAPS07

Published at Mon 26, 2007 08:26 | Permalink Permalink | Comments Comments (0) | Trackbacks Trackbacks (0)

I will spend this week on the ETAPS conference (website).

So far it is a great experience. All the people are very social and you get the opportunity of talking to great minds in computer science.

Looking at the database, there are more than 700 people registered on this conference. During this week, the conferences are held in Theatro Circo in Braga.

When I find my code in tons of trouble, Friends and colleagues come to me, Speaking words of wisdom: "Write in C."

As the deadline fast approaches, And bugs are all that I can see, Somewhere, someone whispers" "Write in C."

Write in C, write in C, Write in C, write in C. LISP is dead and buried, Write in C.

I used to write a lot of FORTRAN, for science it worked flawlessly. Try using it for graphics! Write in C.

If you've just spent nearly 30 hours Debugging some assembly, Soon you will be glad to Write in C.

Write in C, write in C, Write In C, yeah, write in C. Only wimps use BASIC. Write in C.

Write in C, write in C, Write in C, oh, write in C. Pascal won't quite cut it. Write in C.

I’ve got a new 2Gb pen drive. It will mostly be used on Linux, but on different machines. So I wanted a filesystem that is better than FAT.

This is not too difficult, but I’ve found that because of the UNIX permissions on filesystems like EXT2 or ReiserFS, it makes the use of the filesystem on multiple systems useless.

I’ve tried to Google about this, but came without any answer…. I really don’t want to go back to FAT. So my solution (for now) is to chmod -R 777 /mnt/pen. This (seems) to work, but more testing needed.

Anyone got a better solution?

About

photo of Ruben Fonseca

My name is Ruben Fonseca. I'm a Computer Science and Systems Engineer from Portugal that loves FLOSS.

I'm currently an Open Source Consultant at Lisbon, Portugal. This blog is about my daily geek life.

You can contact me anytime at or via LinkedIn:

View Ruben Fonseca's profile on LinkedIn

Feeds

Music