Skip to content

Commit 4a69dd6

Browse files
author
Tyler Whitney
committed
Merge branch 'main' of https://github.com/MicrosoftDocs/cpp-docs-pr into alt-text2
2 parents d5dbdc2 + 931c56c commit 4a69dd6

7 files changed

Lines changed: 50 additions & 25 deletions

File tree

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Thank you for your interest in contributing to the Visual C++ documentation!
44

5-
In this topic, you'll see the basic process for adding or updating content in the [Visual C++ documentation site](https://docs.microsoft.com/cpp/).
5+
In this topic, you'll see the basic process for adding or updating content in the [Visual C++ documentation site](https://learn.microsoft.com/cpp/).
66

77
In this topic, we'll cover:
88

@@ -54,7 +54,7 @@ The Visual Studio team will review your PR and let you know if the change looks
5454

5555
The maintainers will merge your PR into the main branch once feedback has been applied and your change looks good.
5656

57-
On a certain cadence, we push all commits from main branch into the live branch and then you'll be able to see your contribution on [Microsoft Docs](https://docs.microsoft.com/cpp/).
57+
On a certain cadence, we push all commits from main branch into the live branch and then you'll be able to see your contribution on [Microsoft Learn](https://learn.microsoft.com/cpp/).
5858

5959
## DOs and DON'Ts
6060

@@ -72,7 +72,7 @@ Below is a short list of guiding rules that you should keep in mind when you are
7272
7373
## Building the docs
7474

75-
The documentation is written in [GitHub-Flavored Markdown](https://help.github.com/categories/writing-on-github/) and built using [DocFX](https://dotnet.github.io/docfx/) and other internal publishing and build tools. It's published on [Microsoft Docs](https://docs.microsoft.com/).
75+
The documentation is written in [GitHub-Flavored Markdown](https://help.github.com/categories/writing-on-github/) and built using [DocFX](https://dotnet.github.io/docfx/) and other internal publishing and build tools. It's published to [Microsoft Learn](https://learn.microsoft.com/).
7676

7777
If you want to build the docs locally, you need to install [DocFX](https://dotnet.github.io/docfx/); latest versions are the best.
7878

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Visual Studio documentation for Microsoft C++
22

3-
Welcome! This repository contains source files for the work-in-progress Microsoft C++ (MSVC or Visual C++) technical documentation. The articles are published on the [C++ in Visual Studio documentation site](https://docs.microsoft.com/cpp).
3+
Welcome! This repository contains source files for the work-in-progress Microsoft C++ (MSVC or Visual C++) technical documentation. The articles are published on the [C++ in Visual Studio documentation site](https://learn.microsoft.com/cpp).
44

55
The documentation for Visual Basic and Visual C# are located in a separate repository at [https://github.com/dotnet/core-docs](https://github.com/dotnet/core-docs), and the Visual Studio documentation is located in the repository located at [https://github.com/Microsoft/visualstudio-docs](https://github.com/Microsoft/visualstudio-docs).
66

77
## Contributing to the documentation
88

9-
We welcome your contributions to help us improve the MSVC docs. For a comprehensive guide to contributing to Microsoft Docs, see the [contributor guide overview](https://docs.microsoft.com/contribute). For details on how to make a contribution to the MSVC documentation, see the [Contributing guide](CONTRIBUTING.md).
9+
We welcome your contributions to help us improve the MSVC docs. For a comprehensive guide to contributing, see the [Microsoft Docs contributor guide](https://learn.microsoft.com/contribute). For details on how to make a contribution to the MSVC documentation, see our [Contributing guidance](CONTRIBUTING.md).
1010

1111
Several feature areas of MSVC have their own folders in this repository, such as `standard-library` for articles on the C++ Standard Library, `ide` for C++-specific articles on the Visual Studio interactive development environment (IDE), and so forth. The `/media` subfolder in each folder contains art files for the articles. The [Contributing guide](CONTRIBUTING.md) has more information.
1212

docs/c-runtime-library/reference/rand.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ void RangedRandDemo(int range_min, int range_max, int n)
7272
// generating random numbers across a large range using the method below.
7373
// The approach below also may result in a non-uniform distribution.
7474
// More robust random number functionality is available in the C++ <random> header.
75-
// See https://docs.microsoft.com/cpp/standard-library/random
75+
// See https://learn.microsoft.com/cpp/standard-library/random
7676
int r = ((double)rand() / RAND_MAX) * (range_max - range_min) + range_min;
7777
printf(" %6d\n", r);
7878
}

docs/code-quality/c6101.md

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,39 @@
11
---
22
description: "Learn more about: C6101"
33
title: C6101
4-
ms.date: 11/04/2016
4+
ms.date: 08/17/2022
55
ms.topic: reference
6-
f1_keywords: ["C6101"]
6+
f1_keywords: ["C6101", "RETURN_UNINIT_VAR", "__WARNING_RETURN_UNINIT_VAR"]
77
helpviewer_keywords: ["C6101"]
88
ms.assetid: 8546367c-5de5-479a-a231-c15c0aa89ef1
99
---
10-
# C6101
10+
# Warning C6101
1111

12-
> warning C6101: Returning uninitialized memory
12+
> Returning uninitialized memory '\**parameter-name*'. A successful path through the function does not set the named \_Out\_ parameter.
1313
14-
A successful path through the function does not set the named `_Out_` parameter. This message is generated based on SAL annotations that indicate that the function in question always succeeds. A function that doesn't return a success/failure indication should set all of its `_Out_` parameters because the analyzer assumes that the `_Out_` parameter is uninitialized data before the function is called, and that the function will set the parameter so that it's no longer uninitialized. If the function does indicate success/failure, then the `_Out_` parameter doesn't have to be set in the case of failure, and you can detect and avoid the uninitialized location. In either case, the objective is to avoid the reading of an uninitialized location. If the function sometimes doesn't touch an `_Out_` parameter that's subsequently used, then the parameter should be initialized before the function call and be marked with the `_Inout_` annotation, or the more explicit `_Pre_null_` or `_Pre_satisfies_()` when appropriate. "Partial success" can be handled with the `_When_` annotation. For more information, see [Using SAL Annotations to Reduce C/C++ Code Defects](../code-quality/using-sal-annotations-to-reduce-c-cpp-code-defects.md).
14+
## Remarks
15+
16+
This message is generated based on SAL annotations that indicate that the function in question always succeeds. A function that doesn't return a success/failure indication should set all of its `_Out_` parameters because the analyzer assumes that the `_Out_` parameter is uninitialized data before the function is called, and that the function will set the parameter so that it's no longer uninitialized. If, however, the function does indicate success/failure and failure occurs, then the `_Out_` parameter doesn't have to be set. You can then detect and avoid the uninitialized location. In either case, the objective is to avoid the reading of an uninitialized location. If the function sometimes doesn't touch an `_Out_` parameter that's later used, then the parameter should be initialized before the function call and be marked with the `_Inout_` annotation, or the more explicit `_Pre_null_` or `_Pre_satisfies_()` when appropriate. "Partial success" can be handled with the `_When_` annotation. For more information, see [Using SAL Annotations to Reduce C/C++ Code Defects](../code-quality/using-sal-annotations-to-reduce-c-cpp-code-defects.md).
17+
18+
Code analysis name: RETURN_UNINIT_VAR
19+
20+
## Example
21+
22+
The following code generates this warning. This issue stems from the pointer p1 not being set despite having been annotated with `_Out_`.
23+
24+
```cpp
25+
void example_func(_Out_ int *p1)
26+
{
27+
return;
28+
}
29+
```
30+
31+
To resolve the issue, you can set the value of the parameter. Or, if the value is always initialized before the function is called, change the SAL annotation to `_Inout_`. By setting the value of the parameter, the following code avoids the warning:
32+
33+
```cpp
34+
void example_func(_Out_ int *p1)
35+
{
36+
*p1 = 1;
37+
return;
38+
}
39+
```

docs/intrinsics/umulh.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
22
description: "Learn more about: __umulh"
33
title: "__umulh"
4-
ms.date: "09/02/2019"
4+
ms.date: 09/19/2022
55
f1_keywords: ["__umulh"]
66
helpviewer_keywords: ["__umulh intrinsic"]
77
ms.assetid: d241b53a-e6f7-4af1-9f6e-84e149158f03
88
---
9-
# __umulh
9+
# `__umulh`
1010

1111
**Microsoft Specific**
1212

@@ -23,10 +23,10 @@ unsigned __int64 __umulh(
2323

2424
### Parameters
2525

26-
*a*\
26+
*`a`*\
2727
[in] The first number to multiply.
2828

29-
*b*\
29+
*`b`*\
3030
[in] The second number to multiply.
3131

3232
## Return value
@@ -35,9 +35,9 @@ The high 64 bits of the 128-bit result of the multiplication.
3535

3636
## Requirements
3737

38-
|Intrinsic|Architecture|
39-
|---------------|------------------|
40-
|`__umulh`|x64|
38+
| Intrinsic | Architecture |
39+
|--|--|
40+
| `__umulh` | x64, ARM64 |
4141

4242
**Header file** \<intrin.h>
4343

docs/mfc/reference/creating-a-web-browser-style-mfc-application.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ void CWebView::OnInitialUpdate()
3737

3838
// TODO: This code navigates to a popular spot on the web.
3939
// Change the code to go where you'd like.
40-
Navigate2(_T("http://www.docs.microsoft.com/"),
40+
Navigate2(_T("https://learn.microsoft.com/"),
4141
NULL,
4242
NULL);
4343
}

styleguide/template.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ To link to a header in a Markdown file in the same repo, use relative linking +
121121

122122
### Docs Links
123123

124-
To link to a file in a different Docs repo, use the docs.microsoft.com relative URL as the link. Don't include the .md suffix or the language/locale element.
124+
To link to a file in a different Docs repo, use the `learn.microsoft.com` relative URL as the link. Don't include the .md suffix or the language/locale element.
125125

126126
- Example: [Universal Windows Platform documentation](/windows/uwp)
127127

@@ -362,8 +362,8 @@ Use backticks (&#96;) for `inline code`. Use inline code for command-line comman
362362

363363
### Shows
364364

365-
[![C++ A General Purpose Language and Library: (01) Getting Started](https://docs.microsoft.com/video/media/e8265f2d-9ea3-4052-99cd-b8cfb246b0f0/clanguagelibrarym01_960.jpg)
366-
](https://docs.microsoft.com/en-us/shows/cplusplus-language-library/01)\
365+
[![C++ A General Purpose Language and Library: (01) Getting Started](https://learn.microsoft.com/video/media/e8265f2d-9ea3-4052-99cd-b8cfb246b0f0/clanguagelibrarym01_960.jpg)
366+
](https://learn.microsoft.com/shows/cplusplus-language-library/01)\
367367
C++ A General Purpose Language and Library: (01) Getting Started.
368368

369369
### YouTube
@@ -408,7 +408,7 @@ And they'll render like this:
408408
> [!div class="button"]
409409
[button links](../docs/core/index.md)
410410

411-
You can see an example of buttons in action at the [Intune docs](https://docs.microsoft.com/intune/get-started/choose-how-to-enroll-devices).
411+
You can see an example of buttons in action at the [Intune docs](https://learn.microsoft.com/intune/get-started/choose-how-to-enroll-devices).
412412

413413
### Selectors
414414

@@ -417,12 +417,12 @@ You can see an example of buttons in action at the [Intune docs](https://docs.mi
417417
- [macOS](../docs/core/tutorials/using-on-macos.md)
418418
- [Windows](../docs/core/tutorials/using-on-windows.md)
419419

420-
You can see an example of selectors in action at the [Intune docs](https://docs.microsoft.com/intune/deploy-use/what-to-tell-your-end-users-about-using-microsoft-intune#how-your-end-users-get-their-apps).
420+
You can see an example of selectors in action at the [Intune docs](https://learn.microsoft.com/intune/deploy-use/what-to-tell-your-end-users-about-using-microsoft-intune#how-your-end-users-get-their-apps).
421421

422422
### Step-By-Steps
423423

424424
>[!div class="step-by-step"]
425425
[Pre](../docs/csharp/expression-trees-interpreting.md)
426426
[Next](../docs/csharp/expression-trees-translating.md)
427427

428-
You can see an example of step-by-steps in action at the [Advanced Threat Analytics docs](https://docs.microsoft.com/advanced-threat-analytics/deploy-use/install-ata-step2).
428+
You can see an example of step-by-steps in action at the [Advanced Threat Analytics docs](https://learn.microsoft.com/advanced-threat-analytics/deploy-use/install-ata-step2).

0 commit comments

Comments
 (0)