comparison win/dw.c @ 2164:05dd5189099f

Win: Fix some warnings reported with -W3 in Visual C. Can compile with -W3 by issuing: "set DEBUG=Y" before building.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Wed, 30 Sep 2020 22:56:59 +0000
parents d953786b2e85
children da33732f182d
comparison
equal deleted inserted replaced
2163:98db0e81a514 2164:05dd5189099f
4704 } 4704 }
4705 4705
4706 if(!_dw_app_id[0]) 4706 if(!_dw_app_id[0])
4707 { 4707 {
4708 /* Generate an Application ID based on the PID if all else fails. */ 4708 /* Generate an Application ID based on the PID if all else fails. */
4709 _snprintf(_dw_app_id, _DW_APP_ID_SIZE, "%s.pid.%d", DW_APP_DOMAIN_DEFAULT, getpid()); 4709 _snprintf(_dw_app_id, _DW_APP_ID_SIZE, "%s.pid.%d", DW_APP_DOMAIN_DEFAULT, _getpid());
4710 } 4710 }
4711 if(!_dw_app_name[0]) 4711 if(!_dw_app_name[0])
4712 { 4712 {
4713 /* If we still don't have an app name, get the executable name */ 4713 /* If we still don't have an app name, get the executable name */
4714 char fullpath[MAX_PATH+1] = {0}, *pos; 4714 char fullpath[MAX_PATH+1] = {0}, *pos;
12950 strcpy(newparams[z], "\""); 12950 strcpy(newparams[z], "\"");
12951 strcat(newparams[z], params[z]); 12951 strcat(newparams[z], params[z]);
12952 strcat(newparams[z], "\""); 12952 strcat(newparams[z], "\"");
12953 } 12953 }
12954 else 12954 else
12955 newparams[z] = strdup(params[z]); 12955 newparams[z] = _strdup(params[z]);
12956 } 12956 }
12957 newparams[count] = NULL; 12957 newparams[count] = NULL;
12958 12958
12959 /* Why does this return intptr_t ... can the PID exceed an integer value? */ 12959 /* Why does this return intptr_t ... can the PID exceed an integer value? */
12960 retcode = (int)_spawnvp(P_NOWAIT, program, (const char * const *)newparams); 12960 retcode = (int)_spawnvp(P_NOWAIT, program, (const char * const *)newparams);
12973 * Parameters: 12973 * Parameters:
12974 * url: Uniform resource locator. 12974 * url: Uniform resource locator.
12975 */ 12975 */
12976 int API dw_browse(const char *url) 12976 int API dw_browse(const char *url)
12977 { 12977 {
12978 char *browseurl = strdup(url); 12978 char *browseurl = _strdup(url);
12979 int retcode; 12979 int retcode;
12980 12980
12981 if(strlen(browseurl) > 7 && strncmp(browseurl, "file://", 7) == 0) 12981 if(strlen(browseurl) > 7 && strncmp(browseurl, "file://", 7) == 0)
12982 { 12982 {
12983 int len, z; 12983 int len, z;