if (tempString) PR_sscanf(tempString, "%d", &width);
if ((const char*)tempString) PR_sscanf(tempString, "%d", &width);
static nsresult HandleArbitraryStartup( nsICmdLineService* cmdLineArgs, nsIPref *prefs,  PRBool heedGeneralStartupPrefs){	nsresult rv;	PRInt32 height  = NS_SIZETOCONTENT;	PRInt32 width  = NS_SIZETOCONTENT;	char* tempString = NULL;	// Get the value of -width option	rv = cmdLineArgs->GetCmdLineValue("-width", &tempString);	if (NS_FAILED(rv)) return rv;		if (tempString) PR_sscanf(tempString, "%d", &width);		// Get the value of -height option	rv = cmdLineArgs->GetCmdLineValue("-height", &tempString);	if (NS_FAILED(rv)) return rv;		if (tempString) PR_sscanf(tempString, "%d", &height);  if (heedGeneralStartupPrefs) {#ifdef DEBUG_CMD_LINE    printf("XXX iterate over all the general.startup.* prefs\n");#endif /* DEBUG_CMD_LINE */    StartupClosure closure;    closure.prefs = prefs;    closure.height = height;    closure.width = width;    prefs->EnumerateChildren(PREF_STARTUP_PREFIX, startupPrefEnumerationFunction,(void *)(&closure));  }  else {    PRInt32 argc = 0;    rv = cmdLineArgs->GetArgc(&argc);	if (NS_FAILED(rv)) return rv;    NS_ASSERTION(argc > 1, "we shouldn't be here if there were no command line arguments");    if (argc <= 1) return NS_ERROR_FAILURE;    char **argv = nsnull;    rv = cmdLineArgs->GetArgv(&argv);    if (NS_FAILED(rv)) return rv;    PRInt32 i = 0;    for (i=1;i<argc;i++) {#ifdef DEBUG_CMD_LINE      printf("XXX argv[%d] = %s\n",i,argv[i]);#endif /* DEBUG_CMD_LINE */      if (IsStartupCommand(argv[i])) {        nsCAutoString progID = "component://netscape/commandlinehandler/general-startup-";        // skip over the - (or / on windows)        char *command = argv[i] + 1;#ifdef XP_UNIX        // unix allows -mail and --mail        if ((argv[i][0] == '-') && (argv[i][1] == '-')) {          command = argv[i] + 2;        }#endif /* XP_UNIX */        progID += (const char *)command;        // this can fail, as someone could do -foo, where -foo is not handled        rv = LaunchApplicationWithArgs((const char *)(argv[i]), cmdLineArgs, (const char *)progID, height, width);      }    }  }  return NS_OK;}