This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Worth a bug report?


Hello,

I ran into the following using gcc 4.2.3 on ubuntu 8.04. I ran it with
-Werror so it died on receiving this warning:

cc1: warnings being treated as errors
tux3fuse.c: In function 'tux3_lookup':
tux3fuse.c:78: warning: initialized field overwritten
tux3fuse.c:78: warning: (near initialization for 'ep.attr')
tux3fuse.c:79: warning: initialized field overwritten
tux3fuse.c:79: warning: (near initialization for 'ep.attr')
tux3fuse.c:80: warning: initialized field overwritten
tux3fuse.c:80: warning: (near initialization for 'ep.attr')
tux3fuse.c:81: warning: initialized field overwritten
tux3fuse.c:81: warning: (near initialization for 'ep.attr')
tux3fuse.c:82: warning: initialized field overwritten
tux3fuse.c:82: warning: (near initialization for 'ep.attr')
tux3fuse.c:83: warning: initialized field overwritten
tux3fuse.c:83: warning: (near initialization for 'ep.attr')
tux3fuse.c:85: warning: initialized field overwritten
tux3fuse.c:85: warning: (near initialization for 'ep.attr')


the code:
struct fuse_entry_param ep = {
			.attr.st_mode  = inode->i_mode,
			.attr.st_atime = inode->i_atime,
			.attr.st_mtime = inode->i_mtime,
			.attr.st_ctime = inode->i_ctime,
			.attr.st_size  = inode->i_size,
			.attr.st_uid   = inode->i_uid,
			.attr.st_gid   = inode->i_gid,
			.attr.st_nlink = inode->i_links,

			.ino = (fuse_ino_t)inode,
			.generation = 1,
			.attr_timeout = 1.0,
			.entry_timeout = 1.0,
		};

It worked fine when i changed the code as .attr = { .st_mode = ...}

Thanks,
-- 
Pranith.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]