Skip to content

Commit cdac41c

Browse files
Merge pull request #4884 from MicrosoftDocs/main638403352442215776sync_temp
For protected branch, push strategy should use PR and merge to target branch method to work around git push error
2 parents 3917622 + b15c009 commit cdac41c

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

docs/c-runtime-library/reference/setlocale-wsetlocale.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "setlocale, _wsetlocale"
33
description: "Describes the Microsoft C runtime (CRT) library functions setlocale and _wsetlocale."
4-
ms.date: 4/20/2023
4+
ms.date: 01/04/2024
55
api_name: ["_wsetlocale", "setlocale", "_o__wsetlocale", "_o_setlocale"]
66
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-locale-l1-1-0.dll"]
77
api_type: ["DLLExport"]
@@ -12,7 +12,7 @@ no-loc: [setlocale, _wsetlocale]
1212
---
1313
# `setlocale`, `_wsetlocale`
1414

15-
Sets or retrieves the run-time locale.
15+
Set or retrieve the run-time locale.
1616

1717
## Syntax
1818

@@ -258,9 +258,8 @@ int get_date(unsigned char* str)
258258
return 0;
259259
}
260260

261-
// This thread sets its locale to the argument
262-
// and prints the date.
263-
uintptr_t __stdcall SecondThreadFunc( void* pArguments )
261+
// This thread sets its locale to the argument and prints the date.
262+
unsigned __stdcall SecondThreadFunc(void* pArguments)
264263
{
265264
unsigned char str[BUFF_SIZE];
266265
char * locale = (char *)pArguments;
@@ -298,7 +297,7 @@ int main()
298297
// Create the second thread with a German locale.
299298
// Our thread function takes an argument of the locale to use.
300299
hThread = (HANDLE)_beginthreadex( NULL, 0, &SecondThreadFunc,
301-
"de-DE", 0, &threadID );
300+
(void*)"de-DE", 0, &threadID );
302301

303302
if (get_date(str) == 0)
304303
{
@@ -316,10 +315,10 @@ int main()
316315
317316
```Output
318317
The thread locale is now set to en-US.
319-
The time in en-US locale is: 'Wednesday, May 12, 2004'
318+
The date in en-US locale is: 'Thursday, January 4, 2024'
320319
321320
The thread locale is now set to de-DE.
322-
The time in de-DE locale is: 'Mittwoch, 12. Mai 2004'
321+
The date in de-DE locale is: 'Donnerstag, 4. Januar 2024'
323322
```
324323

325324
## See also

docs/error-messages/compiler-warnings/compiler-warning-level-4-c4019.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,13 @@ ms.assetid: 4ecfe85d-673f-4334-8154-36fe7f0b3444
1010

1111
empty statement at global scope
1212

13-
A semicolon at global scope is not preceded by a statement.
13+
A semicolon at global scope isn't preceded by a statement.
1414

1515
This warning may be fixed if you remove the extra semicolon.
1616

17+
> [!Important]
18+
> This warning only applies to C programs.
19+
1720
## Example
1821

1922
```c

0 commit comments

Comments
 (0)