mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-08 06:53:45 +00:00
ICU-4288 fix lots of build warnings
X-SVN-Rev: 17264
This commit is contained in:
parent
d46f327899
commit
61b54a383a
11 changed files with 45 additions and 45 deletions
|
@ -20,7 +20,7 @@ class GDIGUISupport : public GUISupport
|
|||
{
|
||||
public:
|
||||
GDIGUISupport() {};
|
||||
~GDIGUISupport() {};
|
||||
virtual ~GDIGUISupport() {};
|
||||
|
||||
virtual void postErrorMessage(const char *message, const char *title);
|
||||
};
|
||||
|
|
|
@ -18,7 +18,7 @@ class GUISupport
|
|||
{
|
||||
public:
|
||||
GUISupport() {};
|
||||
~GUISupport() {};
|
||||
virtual ~GUISupport() {};
|
||||
|
||||
virtual void postErrorMessage(const char *message, const char *title) = 0;
|
||||
};
|
||||
|
|
|
@ -34,7 +34,7 @@ GnomeSurface::~GnomeSurface()
|
|||
}
|
||||
|
||||
void GnomeSurface::drawGlyphs(const LEFontInstance *font, const LEGlyphID *glyphs, le_int32 count,
|
||||
const float *positions, le_int32 x, le_int32 y, le_int32 width, le_int32 height)
|
||||
const float *positions, le_int32 x, le_int32 y, le_int32 /*width*/, le_int32 /*height*/)
|
||||
{
|
||||
GnomeFontInstance *gFont = (GnomeFontInstance *) font;
|
||||
TT_Instance instance = gFont->getFont();
|
||||
|
@ -42,7 +42,7 @@ void GnomeSurface::drawGlyphs(const LEFontInstance *font, const LEGlyphID *glyph
|
|||
le_int32 *dy = LE_NEW_ARRAY(le_int32, count);
|
||||
le_int32 xOffset, yOffset;
|
||||
TT_Raster_Map *raster;
|
||||
TT_Error error;
|
||||
// TT_Error error;
|
||||
|
||||
for (le_int32 g = 0; g < count; g += 1) {
|
||||
dx[g] = (le_int32) (positions[g * 2 + 2] - positions[g * 2]);
|
||||
|
|
|
@ -136,7 +136,7 @@ private:
|
|||
static const char fgClassID;
|
||||
};
|
||||
|
||||
inline const void *ScriptCompositeFontInstance::getFontTable(LETag tableTag) const
|
||||
inline const void *ScriptCompositeFontInstance::getFontTable(LETag /*tableTag*/) const
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ const UChar *UnicodeReader::readFile(const char *fileName, GUISupport *guiSuppor
|
|||
char *byteBuffer;
|
||||
char startBytes[4] = {'\xA5', '\xA5', '\xA5', '\xA5'};
|
||||
char errorMessage[128];
|
||||
char *cp = "";
|
||||
const char *cp = "";
|
||||
int32_t signatureLength = 0;
|
||||
|
||||
f = fopen(fileName, "rb");
|
||||
|
|
|
@ -46,7 +46,7 @@ static GSList *appList = NULL;
|
|||
GtkWidget *newSample(const gchar *fileName);
|
||||
void closeSample(GtkWidget *sample);
|
||||
|
||||
void showabout(GtkWidget *widget, gpointer data)
|
||||
void showabout(GtkWidget */*widget*/, gpointer /*data*/)
|
||||
{
|
||||
GtkWidget *aboutBox;
|
||||
const gchar *writtenBy[] = {
|
||||
|
@ -64,7 +64,7 @@ void showabout(GtkWidget *widget, gpointer data)
|
|||
gtk_widget_show(aboutBox);
|
||||
}
|
||||
|
||||
void notimpl(GtkObject *object, gpointer data)
|
||||
void notimpl(GtkObject */*object*/, gpointer /*data*/)
|
||||
{
|
||||
gnome_ok_dialog("Not implemented...");
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ gchar *prettyTitle(const gchar *path)
|
|||
return title;
|
||||
}
|
||||
|
||||
void openOK(GtkObject *object, gpointer data)
|
||||
void openOK(GtkObject */*object*/, gpointer data)
|
||||
{
|
||||
GtkFileSelection *fileselection = GTK_FILE_SELECTION(data);
|
||||
GtkWidget *app = GTK_WIDGET(gtk_object_get_data(GTK_OBJECT(fileselection), "app"));
|
||||
|
@ -110,7 +110,7 @@ void openOK(GtkObject *object, gpointer data)
|
|||
g_free(fileName);
|
||||
}
|
||||
|
||||
void openfile(GtkObject *object, gpointer data)
|
||||
void openfile(GtkObject */*object*/, gpointer data)
|
||||
{
|
||||
GtkWidget *app = GTK_WIDGET(data);
|
||||
GtkWidget *fileselection;
|
||||
|
@ -142,29 +142,29 @@ void openfile(GtkObject *object, gpointer data)
|
|||
gtk_main();
|
||||
}
|
||||
|
||||
void newapp(GtkObject *object, gpointer data)
|
||||
void newapp(GtkObject */*object*/, gpointer /*data*/)
|
||||
{
|
||||
GtkWidget *app = newSample("Sample.txt");
|
||||
|
||||
gtk_widget_show_all(app);
|
||||
}
|
||||
|
||||
void closeapp(GtkWidget *widget, gpointer data)
|
||||
void closeapp(GtkWidget */*widget*/, gpointer data)
|
||||
{
|
||||
GtkWidget *app = GTK_WIDGET(data);
|
||||
|
||||
closeSample(app);
|
||||
}
|
||||
|
||||
void shutdown(GtkObject *object, gpointer data)
|
||||
void shutdown(GtkObject */*object*/, gpointer /*data*/)
|
||||
{
|
||||
gtk_main_quit();
|
||||
}
|
||||
|
||||
GnomeUIInfo fileMenu[] =
|
||||
{
|
||||
GNOMEUIINFO_MENU_NEW_ITEM("_New Sample",
|
||||
"Create a new Gnome Layout Sample",
|
||||
GNOMEUIINFO_MENU_NEW_ITEM((gchar *) "_New Sample",
|
||||
(gchar *) "Create a new Gnome Layout Sample",
|
||||
newapp, NULL),
|
||||
|
||||
GNOMEUIINFO_MENU_OPEN_ITEM(openfile, NULL),
|
||||
|
@ -183,12 +183,12 @@ GnomeUIInfo helpMenu[] =
|
|||
|
||||
GnomeUIInfo mainMenu[] =
|
||||
{
|
||||
GNOMEUIINFO_SUBTREE(N_("File"), fileMenu),
|
||||
GNOMEUIINFO_SUBTREE(N_("Help"), helpMenu),
|
||||
GNOMEUIINFO_SUBTREE(N_((gchar *) "File"), fileMenu),
|
||||
GNOMEUIINFO_SUBTREE(N_((gchar *) "Help"), helpMenu),
|
||||
GNOMEUIINFO_END
|
||||
};
|
||||
|
||||
gint eventDelete(GtkWidget *widget, GdkEvent *event, gpointer data)
|
||||
gint eventDelete(GtkWidget *widget, GdkEvent */*event*/, gpointer /*data*/)
|
||||
{
|
||||
closeSample(widget);
|
||||
|
||||
|
@ -196,7 +196,7 @@ gint eventDelete(GtkWidget *widget, GdkEvent *event, gpointer data)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
gint eventConfigure(GtkWidget *widget, GdkEventConfigure *event, Context *context)
|
||||
gint eventConfigure(GtkWidget */*widget*/, GdkEventConfigure *event, Context *context)
|
||||
{
|
||||
if (context->paragraph != NULL) {
|
||||
context->width = event->width;
|
||||
|
@ -210,7 +210,7 @@ gint eventConfigure(GtkWidget *widget, GdkEventConfigure *event, Context *contex
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
gint eventExpose(GtkWidget *widget, GdkEvent *event, Context *context)
|
||||
gint eventExpose(GtkWidget *widget, GdkEvent */*event*/, Context *context)
|
||||
{
|
||||
if (context->paragraph != NULL) {
|
||||
gint maxLines = context->paragraph->getLineCount() - 1;
|
||||
|
|
|
@ -63,7 +63,7 @@ le_int8 PortableFontInstance::highBit(le_int32 value)
|
|||
return bit;
|
||||
}
|
||||
|
||||
PortableFontInstance::PortableFontInstance(char *fileName, float pointSize, LEErrorCode &status)
|
||||
PortableFontInstance::PortableFontInstance(const char *fileName, float pointSize, LEErrorCode &status)
|
||||
: fFile(NULL), fPointSize(pointSize), fUnitsPerEM(0), fFontChecksum(0), fAscent(0), fDescent(0), fLeading(0),
|
||||
fDirectory(NULL), fNAMETable(NULL), fNameCount(0), fNameStringOffset(0), fCMAPMapper(NULL), fHMTXTable(NULL), fNumGlyphs(0), fNumLongHorMetrics(0)
|
||||
{
|
||||
|
@ -89,7 +89,7 @@ PortableFontInstance::PortableFontInstance(char *fileName, float pointSize, LEEr
|
|||
const LETag hheaTag = LE_HHEA_TABLE_TAG;
|
||||
const HEADTable *headTable = NULL;
|
||||
const HHEATable *hheaTable = NULL;
|
||||
const NAMETable *nameTable = NULL;
|
||||
// const NAMETable *nameTable = NULL;
|
||||
le_uint16 numTables = 0;
|
||||
|
||||
fDirectory = (const SFNTDirectory *) LE_NEW_ARRAY(char, dirSize);
|
||||
|
@ -329,7 +329,7 @@ void PortableFontInstance::getGlyphAdvance(LEGlyphID glyph, LEPoint &advance) co
|
|||
advance.fY = 0;
|
||||
}
|
||||
|
||||
le_bool PortableFontInstance::getGlyphPoint(LEGlyphID glyph, le_int32 pointNumber, LEPoint &point) const
|
||||
le_bool PortableFontInstance::getGlyphPoint(LEGlyphID /*glyph*/, le_int32 /*pointNumber*/, LEPoint &/*point*/) const
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
@ -67,7 +67,7 @@ protected:
|
|||
const void *readFontTable(LETag tableTag) const;
|
||||
|
||||
public:
|
||||
PortableFontInstance(char *fileName, float pointSize, LEErrorCode &status);
|
||||
PortableFontInstance(const char *fileName, float pointSize, LEErrorCode &status);
|
||||
|
||||
virtual ~PortableFontInstance();
|
||||
|
||||
|
|
|
@ -30,17 +30,17 @@ U_NAMESPACE_USE
|
|||
|
||||
struct TestInput
|
||||
{
|
||||
char *fontName;
|
||||
LEUnicode *text;
|
||||
le_int32 textLength;
|
||||
le_int32 scriptCode;
|
||||
le_bool rightToLeft;
|
||||
const char *fontName;
|
||||
LEUnicode *text;
|
||||
le_int32 textLength;
|
||||
le_int32 scriptCode;
|
||||
le_bool rightToLeft;
|
||||
};
|
||||
|
||||
/*
|
||||
* FIXME: should use the output file name and the current date.
|
||||
*/
|
||||
char *header =
|
||||
const char *header =
|
||||
"/*\n"
|
||||
" *******************************************************************************\n"
|
||||
" *\n"
|
||||
|
@ -267,7 +267,7 @@ TestInput testInputs[] = {
|
|||
|
||||
le_int32 testCount = TEST_COUNT;
|
||||
|
||||
void dumpShorts(FILE *file, char *label, le_int32 id, le_uint16 *shorts, le_int32 count) {
|
||||
void dumpShorts(FILE *file, const char *label, le_int32 id, le_uint16 *shorts, le_int32 count) {
|
||||
char lineBuffer[8 * 8 + 2];
|
||||
le_int32 bufp = 0;
|
||||
|
||||
|
@ -290,7 +290,7 @@ void dumpShorts(FILE *file, char *label, le_int32 id, le_uint16 *shorts, le_int3
|
|||
fprintf(file, "};\n\n");
|
||||
}
|
||||
|
||||
void dumpLongs(FILE *file, char *label, le_int32 id, le_int32 *longs, le_int32 count) {
|
||||
void dumpLongs(FILE *file, const char *label, le_int32 id, le_int32 *longs, le_int32 count) {
|
||||
char lineBuffer[8 * 12 + 2];
|
||||
le_int32 bufp = 0;
|
||||
|
||||
|
@ -313,7 +313,7 @@ void dumpLongs(FILE *file, char *label, le_int32 id, le_int32 *longs, le_int32 c
|
|||
fprintf(file, "};\n\n");
|
||||
}
|
||||
|
||||
void dumpFloats(FILE *file, char *label, le_int32 id, float *floats, le_int32 count) {
|
||||
void dumpFloats(FILE *file, const char *label, le_int32 id, float *floats, le_int32 count) {
|
||||
char lineBuffer[8 * 16 + 2];
|
||||
le_int32 bufp = 0;
|
||||
|
||||
|
@ -350,13 +350,13 @@ const char *getShortName(le_int32 scriptCode)
|
|||
return shortName;
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
int main(int /*argc*/, char *argv[])
|
||||
{
|
||||
le_int32 test;
|
||||
FILE *outputFile = fopen(argv[1], "w");
|
||||
time_t now = time(NULL);
|
||||
struct tm *local = localtime(&now);
|
||||
char *tmFormat = "%m/%d/%Y %I:%M:%S %p %Z";
|
||||
const char *tmFormat = "%m/%d/%Y %I:%M:%S %p %Z";
|
||||
char tmString[64];
|
||||
|
||||
strftime(tmString, 64, tmFormat, local);
|
||||
|
@ -373,7 +373,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
const char *nameString = fontInstance.getNameString(NAME_VERSION_STRING, PLATFORM_MACINTOSH, MACINTOSH_ROMAN, MACINTOSH_ENGLISH);
|
||||
|
||||
fprintf(outputFile, "char *fontVersionString%d = \"%s\";\n", test, nameString);
|
||||
fprintf(outputFile, "const char *fontVersionString%d = \"%s\";\n", test, nameString);
|
||||
fprintf(outputFile, "le_uint32 fontChecksum%d = 0x%8.8X;\n\n", test, fontInstance.getFontChecksum());
|
||||
|
||||
fontInstance.deleteNameString(nameString);
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
U_NAMESPACE_USE
|
||||
|
||||
le_bool compareResults(le_int32 testNumber, TestResult *expected, TestResult *actual)
|
||||
le_bool compareResults(le_int32 /*testNumber*/, TestResult *expected, TestResult *actual)
|
||||
{
|
||||
/* NOTE: we'll stop on the first failure 'cause once there's one error, it may cascade... */
|
||||
if (actual->glyphCount != expected->glyphCount) {
|
||||
|
@ -83,7 +83,7 @@ static void checkFontVersion(PortableFontInstance &fontInstance, const char *tes
|
|||
}
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
int main(int /*argc*/, char */*argv[]*/)
|
||||
{
|
||||
le_int32 failures = 0;
|
||||
|
||||
|
|
|
@ -17,13 +17,13 @@
|
|||
|
||||
struct TestInput
|
||||
{
|
||||
char *fontName;
|
||||
char *fontVersionString;
|
||||
le_uint32 fontChecksum;
|
||||
LEUnicode *text;
|
||||
le_int32 textLength;
|
||||
le_int32 scriptCode;
|
||||
le_bool rightToLeft;
|
||||
const char *fontName;
|
||||
const char *fontVersionString;
|
||||
le_uint32 fontChecksum;
|
||||
LEUnicode *text;
|
||||
le_int32 textLength;
|
||||
le_int32 scriptCode;
|
||||
le_bool rightToLeft;
|
||||
};
|
||||
|
||||
extern le_int32 testCount;
|
||||
|
|
Loading…
Add table
Reference in a new issue