8329352: Remove dead code in splashscreen_sys.c

Reviewed-by: jiefu, prr
This commit is contained in:
Man Cao 2024-04-02 07:26:18 +00:00
parent 3d2283800a
commit 816638e3be

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -378,33 +378,6 @@ sendctl(Splash * splash, char code) {
}
}
int
HandleError(Display * disp, XErrorEvent * err) {
// silently ignore non-fatal errors
/*
char msg[0x1000];
char buf[0x1000];
XGetErrorText(disp, err->error_code, msg, sizeof(msg));
fprintf(stderr, "Xerror %s, XID %x, ser# %d\n", msg, err->resourceid,
err->serial);
snprintf(buf, sizeof(buf), "%d", err->request_code);
XGetErrorDatabaseText(disp, "XRequest", buf, "Unknown", msg, sizeof(msg));
fprintf(stderr, "Major opcode %d (%s)\n", err->request_code, msg);
if (err->request_code > 128) {
fprintf(stderr, "Minor opcode %d\n", err->minor_code);
}
*/
return 0;
}
int
HandleIOError(Display * display) {
// for really bad errors, we should exit the thread we're on
SplashCleanup(SplashGetInstance());
pthread_exit(NULL);
return 0;
}
int
SplashInitPlatform(Splash * splash) {
int shapeVersionMajor, shapeVersionMinor;
@ -417,10 +390,6 @@ SplashInitPlatform(Splash * splash) {
pthread_mutex_init(&splash->lock, NULL);
// We should not ignore any errors.
//XSetErrorHandler(HandleError);
// XSetIOErrorHandler(HandleIOError);
XSetIOErrorHandler(NULL);
splash->display = XOpenDisplay(NULL);
if (!splash->display) {
splash->isVisible = -1;