Fix some compiler warnings

This commit is contained in:
Marvin W 2020-01-22 00:09:06 +01:00
parent 48cd863025
commit 8c5957537c
No known key found for this signature in database
GPG key ID: 072E9235DB996F2A
7 changed files with 28 additions and 28 deletions

View file

@ -91,14 +91,14 @@ public abstract interface NotificationPopulator : Object {
public abstract class MetaConversationItem : Object { public abstract class MetaConversationItem : Object {
public virtual string populator_id { get; set; } public virtual string populator_id { get; set; }
public virtual Jid? jid { get; set; default=null; } public virtual Jid jid { get; set; }
public virtual bool dim { get; set; default=false; } public virtual bool dim { get; set; default=false; }
public virtual DateTime? sort_time { get; set; default=null; } public virtual DateTime sort_time { get; set; default = new DateTime.now_utc(); }
public virtual long seccondary_sort_indicator { get; set; } public virtual long seccondary_sort_indicator { get; set; }
public virtual long tertiary_sort_indicator { get; set; } public virtual long tertiary_sort_indicator { get; set; }
public virtual DateTime? display_time { get; set; default=null; } public virtual DateTime display_time { get; set; default = new DateTime.now_utc(); }
public virtual Encryption? encryption { get; set; default=null; } public virtual Encryption encryption { get; set; default = Encryption.NONE; }
public virtual Entities.Message.Marked? mark { get; set; default=null; } public virtual Entities.Message.Marked mark { get; set; default = Entities.Message.Marked.NONE; }
public abstract bool can_merge { get; set; } public abstract bool can_merge { get; set; }
public abstract bool requires_avatar { get; set; } public abstract bool requires_avatar { get; set; }

View file

@ -223,11 +223,11 @@ public interface ContentFilter : Object {
public abstract class ContentItem : Object { public abstract class ContentItem : Object {
public int id { get; set; } public int id { get; set; }
public string type_ { get; set; } public string type_ { get; set; }
public Jid? jid { get; set; default=null; } public Jid jid { get; set; }
public DateTime? sort_time { get; set; default=null; } public DateTime sort_time { get; set; }
public DateTime? display_time { get; set; default=null; } public DateTime display_time { get; set; }
public Encryption? encryption { get; set; default=null; } public Encryption encryption { get; set; }
public Entities.Message.Marked? mark { get; set; default=null; } public Entities.Message.Marked mark { get; set; }
ContentItem(int id, string ty, Jid jid, DateTime sort_time, DateTime display_time, Encryption encryption, Entities.Message.Marked mark) { ContentItem(int id, string ty, Jid jid, DateTime sort_time, DateTime display_time, Encryption encryption, Entities.Message.Marked mark) {
this.id = id; this.id = id;

View file

@ -236,7 +236,7 @@ static gboolean
has_variations (GVariant *emoji_data) has_variations (GVariant *emoji_data)
{ {
GVariant *codes; GVariant *codes;
int i; gsize i;
gboolean has_variations; gboolean has_variations;
has_variations = FALSE; has_variations = FALSE;
@ -366,7 +366,7 @@ add_emoji (GtkWidget *box,
GVariant *codes; GVariant *codes;
char text[64]; char text[64];
char *p = text; char *p = text;
int i; gsize i;
PangoLayout *layout; PangoLayout *layout;
PangoRectangle rect; PangoRectangle rect;
@ -451,21 +451,21 @@ populate_emoji_chooser (gpointer data)
g_variant_get_child (item, 1, "&s", &name); g_variant_get_child (item, 1, "&s", &name);
if (strcmp (name, chooser->body.first) == 0) if (g_strcmp0 (name, chooser->body.first) == 0)
chooser->box = chooser->body.box; chooser->box = chooser->body.box;
else if (strcmp (name, chooser->nature.first) == 0) else if (g_strcmp0 (name, chooser->nature.first) == 0)
chooser->box = chooser->nature.box; chooser->box = chooser->nature.box;
else if (strcmp (name, chooser->food.first) == 0) else if (g_strcmp0 (name, chooser->food.first) == 0)
chooser->box = chooser->food.box; chooser->box = chooser->food.box;
else if (strcmp (name, chooser->travel.first) == 0) else if (g_strcmp0 (name, chooser->travel.first) == 0)
chooser->box = chooser->travel.box; chooser->box = chooser->travel.box;
else if (strcmp (name, chooser->activities.first) == 0) else if (g_strcmp0 (name, chooser->activities.first) == 0)
chooser->box = chooser->activities.box; chooser->box = chooser->activities.box;
else if (strcmp (name, chooser->objects.first) == 0) else if (g_strcmp0 (name, chooser->objects.first) == 0)
chooser->box = chooser->objects.box; chooser->box = chooser->objects.box;
else if (strcmp (name, chooser->symbols.first) == 0) else if (g_strcmp0 (name, chooser->symbols.first) == 0)
chooser->box = chooser->symbols.box; chooser->box = chooser->symbols.box;
else if (strcmp (name, chooser->flags.first) == 0) else if (g_strcmp0 (name, chooser->flags.first) == 0)
chooser->box = chooser->flags.box; chooser->box = chooser->flags.box;
add_emoji (chooser->box, FALSE, item, 0, chooser); add_emoji (chooser->box, FALSE, item, 0, chooser);

View file

@ -89,9 +89,9 @@ private enum StateType {
} }
private class MetaChatStateItem : Plugins.MetaConversationItem { private class MetaChatStateItem : Plugins.MetaConversationItem {
public override Jid? jid { get; set; } public override Jid jid { get; set; }
public override bool dim { get; set; default=true; } public override bool dim { get; set; default=true; }
public override DateTime? sort_time { get; set; default=new DateTime.now_utc().add_years(10); } public override DateTime sort_time { get; set; default=new DateTime.now_utc().add_years(10); }
public override bool can_merge { get; set; default=false; } public override bool can_merge { get; set; default=false; }
public override bool requires_avatar { get; set; default=false; } public override bool requires_avatar { get; set; default=false; }

View file

@ -67,10 +67,10 @@ public class ContentProvider : ContentItemCollection, Object {
} }
public class ContentMetaItem : Plugins.MetaConversationItem { public class ContentMetaItem : Plugins.MetaConversationItem {
public override Jid? jid { get; set; } public override Jid jid { get; set; }
public override DateTime? sort_time { get; set; } public override DateTime sort_time { get; set; }
public override DateTime? display_time { get; set; } public override DateTime display_time { get; set; }
public override Encryption? encryption { get; set; } public override Encryption encryption { get; set; }
public ContentItem content_item; public ContentItem content_item;
private ContentItemWidgetFactory widget_factory; private ContentItemWidgetFactory widget_factory;

View file

@ -121,7 +121,7 @@ public class ItemMetaDataHeader : Box {
update_name_label(); update_name_label();
name_label.style_updated.connect(update_name_label); name_label.style_updated.connect(update_name_label);
if (item.encryption != null && item.encryption != Encryption.NONE) { if (item.encryption != Encryption.NONE) {
encryption_image.visible = true; encryption_image.visible = true;
encryption_image.set_from_icon_name("dino-changes-prevent-symbolic", ICON_SIZE_HEADER); encryption_image.set_from_icon_name("dino-changes-prevent-symbolic", ICON_SIZE_HEADER);
} }

View file

@ -52,7 +52,7 @@ class DateSeparatorPopulator : Plugins.ConversationItemPopulator, Plugins.Conver
} }
public class MetaDateItem : Plugins.MetaConversationItem { public class MetaDateItem : Plugins.MetaConversationItem {
public override DateTime? sort_time { get; set; } public override DateTime sort_time { get; set; }
public override bool can_merge { get; set; default=false; } public override bool can_merge { get; set; default=false; }
public override bool requires_avatar { get; set; default=false; } public override bool requires_avatar { get; set; default=false; }