Fix some warning

This commit is contained in:
Aoran Zeng 2023-09-06 19:45:37 +08:00
parent 669c5f31f5
commit 67d28684d7
3 changed files with 5 additions and 8 deletions

View File

@ -584,8 +584,6 @@ pl_dotnet_getsrc (char* option)
void void
pl_dotnet_setsrc (char* option) pl_dotnet_setsrc (char* option)
{ {
int index = 0; char* check_cmd = NULL;
xy_error ("chsrc: 暂时无法为NuGet换源若有需求请您提交issue"); xy_error ("chsrc: 暂时无法为NuGet换源若有需求请您提交issue");
} }
@ -1656,7 +1654,6 @@ main (int argc, char const *argv[])
} }
const char* command = argv[1]; const char* command = argv[1];
const char* target = NULL;
bool matched = false; bool matched = false;

View File

@ -475,7 +475,7 @@ int
dblary_maxidx(double* array, int size) dblary_maxidx(double* array, int size)
{ {
double maxval = array[0]; double maxval = array[0];
double maxidx = 0; int maxidx = 0;
for (int i=1; i<size; i++) { for (int i=1; i<size; i++) {
if (array[i]>maxval) { if (array[i]>maxval) {

8
xy.h
View File

@ -33,7 +33,7 @@
static bool xy_on_windows = true; static bool xy_on_windows = true;
static bool xy_on_linux = false; static bool xy_on_linux = false;
static bool xy_on_macos = false; static bool xy_on_macos = false;
static bool xy_on_bsds = false; static bool xy_on_bsd = false;
static char* xy_os_devnull = "nul"; static char* xy_os_devnull = "nul";
@ -45,7 +45,7 @@
static bool xy_on_windows = false; static bool xy_on_windows = false;
static bool xy_on_linux = true; static bool xy_on_linux = true;
static bool xy_on_macos = false; static bool xy_on_macos = false;
static bool xy_on_bsds = false; static bool xy_on_bsd = false;
static char* xy_os_devnull = "/dev/null"; static char* xy_os_devnull = "/dev/null";
@ -56,7 +56,7 @@
static bool xy_on_windows = false; static bool xy_on_windows = false;
static bool xy_on_linux = false; static bool xy_on_linux = false;
static bool xy_on_macos = true; static bool xy_on_macos = true;
static bool xy_on_bsds = false; static bool xy_on_bsd = false;
// set xy_os_devnull // set xy_os_devnull
@ -67,7 +67,7 @@
static bool xy_on_windows = false; static bool xy_on_windows = false;
static bool xy_on_linux = false; static bool xy_on_linux = false;
static bool xy_on_macos = false; static bool xy_on_macos = false;
static bool xy_on_bsds = true; static bool xy_on_bsd = true;
// set xy_os_devnull // set xy_os_devnull