@@ -61,9 +61,9 @@ void notification_print(const struct notification *n)
6161 printf ("\ticon_id: '%s'\n" , STR_NN (n -> icon_id ));
6262 printf ("\tdesktop_entry: '%s'\n" , n -> desktop_entry ? n -> desktop_entry : "" );
6363 printf ("\tcategory: %s\n" , STR_NN (n -> category ));
64- printf ("\ttimeout: %ld \n" , n -> timeout /1000 );
65- printf ("\tstart: %ld \n" , n -> start );
66- printf ("\ttimestamp: %ld \n" , n -> timestamp );
64+ printf ("\ttimeout: %" G_GINT64_FORMAT " \n" , n -> timeout /1000 );
65+ printf ("\tstart: %" G_GINT64_FORMAT " \n" , n -> start );
66+ printf ("\ttimestamp: %" G_GINT64_FORMAT " \n" , n -> timestamp );
6767 printf ("\turgency: %s\n" , notification_urgency_to_string (n -> urgency ));
6868 printf ("\ttransient: %d\n" , n -> transient );
6969 printf ("\tformatted: '%s'\n" , STR_NN (n -> msg ));
@@ -148,8 +148,8 @@ void notification_run_script(struct notification *n)
148148 // Set environment variables
149149 gchar * n_id_str = g_strdup_printf ("%i" , n -> id );
150150 gchar * n_progress_str = g_strdup_printf ("%i" , n -> progress );
151- gchar * n_timeout_str = g_strdup_printf ("%li" , n -> timeout /1000 );
152- gchar * n_timestamp_str = g_strdup_printf ("%li" , n -> timestamp / 1000 );
151+ gchar * n_timeout_str = g_strdup_printf ("%" G_GINT64_FORMAT , n -> timeout /1000 );
152+ gchar * n_timestamp_str = g_strdup_printf ("%" G_GINT64_FORMAT , n -> timestamp / 1000 );
153153 safe_setenv ("DUNST_APP_NAME" , appname );
154154 safe_setenv ("DUNST_SUMMARY" , summary );
155155 safe_setenv ("DUNST_BODY" , body );
@@ -725,15 +725,14 @@ void notification_update_text_to_render(struct notification *n)
725725
726726 char * new_buf ;
727727 if (hours > 0 ) {
728- new_buf =
729- g_strdup_printf ("%s (%ldh %ldm %lds old)" , buf , hours ,
730- minutes , seconds );
728+ new_buf = g_strdup_printf ("%s (%" G_GINT64_FORMAT "h %" G_GINT64_FORMAT "m %" G_GINT64_FORMAT "s old)" ,
729+ buf , hours , minutes , seconds );
731730 } else if (minutes > 0 ) {
732- new_buf =
733- g_strdup_printf ("%s (%ldm %lds old)" , buf , minutes ,
734- seconds );
731+ new_buf = g_strdup_printf ("%s (%" G_GINT64_FORMAT "m %" G_GINT64_FORMAT "s old)" ,
732+ buf , minutes , seconds );
735733 } else {
736- new_buf = g_strdup_printf ("%s (%lds old)" , buf , seconds );
734+ new_buf = g_strdup_printf ("%s (%" G_GINT64_FORMAT "s old)" ,
735+ buf , seconds );
737736 }
738737
739738 g_free (buf );
0 commit comments