]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Report warning on duplicate attributes
authorJürg Billeter <j@bitron.ch>
Fri, 9 Dec 2011 12:15:08 +0000 (13:15 +0100)
committerJürg Billeter <j@bitron.ch>
Mon, 12 Dec 2011 19:52:25 +0000 (20:52 +0100)
vala/valaparser.vala
vapi/libosso.vapi
vapi/linux.vapi

index 8aee7961eb07eabdeeb2d3cb0fc0dbeafc015085..89c844028d517a1e7fed41d7ef782a2ade34d841 100644 (file)
@@ -2149,6 +2149,9 @@ public class Vala.Parser : CodeVisitor {
        void set_attributes (CodeNode node, List<Attribute>? attributes) {
                if (attributes != null) {
                        foreach (Attribute attr in (List<Attribute>) attributes) {
+                               if (node.get_attribute (attr.name) != null) {
+                                       Report.warning (attr.source_reference, "ignoring duplicate attribute `%s`".printf (attr.name));
+                               }
                                node.attributes.append (attr);
                        }
                }
index 95e5f24457561d2b33137ff9841d310bc195bd44..c6879c5f0dd742ed7cb9757350eb85e40da73842 100644 (file)
@@ -96,7 +96,7 @@ namespace Osso {
                /* Time Notification */
                [CCode (cname = "osso_time_set_notification_cb")]
                public Status set_time_notification_callback (TimeCallback cb, void* data);
-               [CCode (cname = "osso_time_set")]
+               //[CCode (cname = "osso_time_set")]
                //public Status set_time (time_t new_time);
 
                /* Locale */
index 3e1de3fc67e20040977498d3d38c9ea287e70c80..48b2ec8b54e0d5a9d16f3de1c03b824fefd20a06 100644 (file)
@@ -3407,7 +3407,6 @@ namespace Linux {
         [CCode (cheader_filename = "termios.h")]
         public const int TIOCM_DSR;
         [CCode (cheader_filename = "termios.h")]
-        [CCode (cheader_filename = "termios.h")]
         public const int TIOCM_OUT1;
         [CCode (cheader_filename = "termios.h")]
         public const int TIOCM_OUT2;