Reordering, causing different register use at the end
| 1953 | |
| 1954 | // Reordering, causing different register use at the end |
| 1955 | S32 zSaveLoad_LoadGame() |
| 1956 | { |
| 1957 | S32 success = false; |
| 1958 | S32 teststat = true; |
| 1959 | S32 rc; |
| 1960 | en_XSGASYNC_STATUS asstat = XSG_ASTAT_NOOP; |
| 1961 | S32 use_tgt = CardtoTgt(currentCard); |
| 1962 | autoSaveCard = currentCard; |
| 1963 | |
| 1964 | st_XSAVEGAME_DATA* xsgdata = zSaveLoadSGInit(XSG_MODE_LOAD); |
| 1965 | xSGTgtSelect(xsgdata, use_tgt); |
| 1966 | xSGGameSet(xsgdata, currentGame); |
| 1967 | |
| 1968 | if (xsgdata == NULL) |
| 1969 | { |
| 1970 | teststat = false; |
| 1971 | } |
| 1972 | |
| 1973 | xSGAddLoadClient(xsgdata, 'ROOM', NULL, xSGT_LoadLoadCB); |
| 1974 | xSGAddLoadClient(xsgdata, 'PREF', NULL, xSGT_LoadPrefsCB); |
| 1975 | xSerial_svgame_register(xsgdata, XSG_MODE_LOAD); |
| 1976 | |
| 1977 | if (!xSGSetup(xsgdata)) |
| 1978 | { |
| 1979 | teststat = false; |
| 1980 | } |
| 1981 | |
| 1982 | en_XSG_WHYFAIL whyFail = XSG_WHYERR_NONE; |
| 1983 | if (teststat) |
| 1984 | { |
| 1985 | rc = xSGProcess(xsgdata); |
| 1986 | if (rc) |
| 1987 | { |
| 1988 | asstat = xSGAsyncStatus(xsgdata, 1, &whyFail, NULL); |
| 1989 | } |
| 1990 | if (!rc) |
| 1991 | { |
| 1992 | teststat = false; |
| 1993 | } |
| 1994 | else |
| 1995 | { |
| 1996 | switch (asstat) |
| 1997 | { |
| 1998 | case XSG_ASTAT_SUCCESS: |
| 1999 | success = true; |
| 2000 | break; |
| 2001 | case XSG_ASTAT_FAILED: |
| 2002 | success = false; |
| 2003 | break; |
| 2004 | case XSG_ASTAT_NOOP: |
| 2005 | case XSG_ASTAT_INPROG: |
| 2006 | break; |
| 2007 | } |
| 2008 | } |
| 2009 | } |
| 2010 | |
| 2011 | if (teststat) |
| 2012 | { |
no test coverage detected