Hello all,

I'm building the latest version of avra with lcc-win32 (http://www.cs.virginia.edu/~lcc-win32/) and compiler emits a couple of warnings:

== cut==
avra.c:
Warning c:\work\avra\avra.c: args.h: 68  Repeated use of const
Warning avra.c: 82  Repeated use of const
Warning avra.c: 150  Missing prototype for 'list_devices'
args.c:
Warning c:\work\avra\args.c: args.h: 68  Repeated use of const
Warning args.c: 55  Repeated use of const
Warning args.c: 69  Repeated use of const
== cut ==

The "missing prototype" one is easy to fix: the declaration of list_devices in device.h should be changed to "void list_devices(void)".

The second warning is related to the dataset structure which is referenced in several places as "const struct dataset const *foo". I can't really figure out what this declaration is supposed to mean, but my guess is that the first "const" declares every field of the structure unassignable, while the second "const" declares the referenced structure itself unassignable, is that right? Shouldn't a single "const" be sufficient in this case?

I could of course just ignore the second warning, but it would be nice to get rid of it.

The fix for the first warning is attached to this post.

--
Sincerely yours,
                        Alexey
--- device.h.original   Sat Jun 11 00:24:44 2011
+++ device.h    Wed Jun 15 09:49:00 2011
@@ -31,4 +31,4 @@
 /* device.c */
 struct device *get_device(struct prog_info *pi,char *name);
 int predef_dev(struct prog_info *pi);
-void list_devices();
+void list_devices(void);
------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Avra-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/avra-user

Reply via email to