gcalctool r2287 - trunk/gcalctool
- From: rancell svn gnome org
- To: svn-commits-list gnome org
- Subject: gcalctool r2287 - trunk/gcalctool
- Date: Sun, 2 Nov 2008 12:07:33 +0000 (UTC)
Author: rancell
Date: Sun Nov 2 12:07:33 2008
New Revision: 2287
URL: http://svn.gnome.org/viewvc/gcalctool?rev=2287&view=rev
Log:
remove compile warnings
Modified:
trunk/gcalctool/ce_tokeniser.l
trunk/gcalctool/display.c
trunk/gcalctool/financial.c
trunk/gcalctool/gtk.c
trunk/gcalctool/mp-trigonometric.c
trunk/gcalctool/mp.c
Modified: trunk/gcalctool/ce_tokeniser.l
==============================================================================
--- trunk/gcalctool/ce_tokeniser.l (original)
+++ trunk/gcalctool/ce_tokeniser.l Sun Nov 2 12:07:33 2008
@@ -34,6 +34,9 @@
#include "ce_parser.tab.h"
%}
+%option noinput
+%option nounput
+
DECIMAL "."|","
SIGN "+"|"-"
CHARACTER [a-z]|[A-Z]
Modified: trunk/gcalctool/display.c
==============================================================================
--- trunk/gcalctool/display.c (original)
+++ trunk/gcalctool/display.c Sun Nov 2 12:07:33 2008
@@ -70,7 +70,7 @@
for (c = str; *c && offset < MAX_DISPLAY - 1; c++, offset++) {
if (strncasecmp(from, c, flen) == 0) {
- SNPRINTF(output + offset, MAX_DISPLAY - offset, to);
+ SNPRINTF(output + offset, MAX_DISPLAY - offset, "%s", to);
c += flen - 1;
offset += tlen - 1;
} else {
Modified: trunk/gcalctool/financial.c
==============================================================================
--- trunk/gcalctool/financial.c (original)
+++ trunk/gcalctool/financial.c Sun Nov 2 12:07:33 2008
@@ -23,7 +23,6 @@
#include "mpmath.h"
#include <libintl.h>
-#define _ gettext
void
calc_ctrm(int t[MP_SIZE], int pint[MP_SIZE], int fv[MP_SIZE], int pv[MP_SIZE])
Modified: trunk/gcalctool/gtk.c
==============================================================================
--- trunk/gcalctool/gtk.c (original)
+++ trunk/gcalctool/gtk.c Sun Nov 2 12:07:33 2008
@@ -524,7 +524,6 @@
{
GtkWidget *widget;
char text[MAXLINE];
- char *desc, *current, *tooltip;
/* Translators: Accuracy Popup: Menu item to show the accuracy dialog. %d is replaced with the current accuracy. */
SNPRINTF(text, MAXLINE, _("_Other (%d) ..."), accuracy);
@@ -885,7 +884,7 @@
SNPRINTF(title, MAXLINE, gettext(hostname_titles[mode]), hostname);
g_free(hostname);
} else {
- SNPRINTF(title, MAXLINE, gettext(titles[mode]));
+ SNPRINTF(title, MAXLINE, "%s", gettext(titles[mode]));
}
gtk_window_set_title(GTK_WINDOW(X->kframe), title);
@@ -1314,9 +1313,9 @@
GtkWidget *d;
d = gtk_message_dialog_new(NULL,
- GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_ERROR, GTK_BUTTONS_OK,
- error->message);
+ GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_MESSAGE_ERROR, GTK_BUTTONS_OK,
+ "%s", error->message);
gtk_dialog_run(GTK_DIALOG(d));
gtk_widget_destroy(d);
g_error_free(error);
Modified: trunk/gcalctool/mp-trigonometric.c
==============================================================================
--- trunk/gcalctool/mp-trigonometric.c (original)
+++ trunk/gcalctool/mp-trigonometric.c Sun Nov 2 12:07:33 2008
@@ -23,7 +23,6 @@
#include <string.h>
#include <math.h>
#include <libintl.h>
-#define _ gettext
#include "mp.h"
#include "mp-internal.h"
@@ -31,9 +30,6 @@
// FIXME: Needed for doerr
#include "calctool.h"
-
-
-
/* COMPARES MP NUMBER X WITH INTEGER I, RETURNING
* +1 IF X > I,
* 0 IF X == I,
Modified: trunk/gcalctool/mp.c
==============================================================================
--- trunk/gcalctool/mp.c (original)
+++ trunk/gcalctool/mp.c Sun Nov 2 12:07:33 2008
@@ -1781,7 +1781,7 @@
mpovfl(int *x, const char *error)
{
if (v->MPerrors) {
- FPRINTF(stderr, error);
+ FPRINTF(stderr, "%s", error);
}
mpchk(1, 4);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]