Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

MSVC warning about signed to unsigned conversion.

Open
#185 0 comments 0 reactions 0 assignees View on GitHub

@MarekKnapek is already working on this.

Since Jan 6, 2026.

  • #186 by @MarekKnapek — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
58/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
c
Domain
build-system

Research direction

Start with nob.h lines 2090 and 2097, then reproduce the warnings using cl nob.c in how_to/010_nob_two_stage. Trace the reported signed-to-unsigned conversions and verify that the example builds with /W4 without C4244 warnings.

Written by the indexing model from the issue text.

Description

Warning 1:
.\nob.h(2090): warning C4244: '=': conversion from '__int64' to 'size_t', possible loss of data

Warning 2:
.\nob.h(2097): warning C4244: 'function': conversion from '__int64' to 'size_t', possible loss of data

Steps to reproduce:

c:\path\to\nob.h\how_to\010_nob_two_stage
>cl nob.c
Microsoft (R) C/C++ Optimizing Compiler Version 19.50.35721 for x86
Copyright (C) Microsoft Corporation.  All rights reserved.

nob.c
Microsoft (R) Incremental Linker Version 14.50.35721.0
Copyright (C) Microsoft Corporation.  All rights reserved.

/out:nob.exe
nob.obj

c:\path\to\nob.h\how_to\010_nob_two_stage
>nob.exe
[INFO] created directory `build/`
[INFO] Generating initial build/config.h
[INFO] ==================================
[INFO] EDIT build/config.h TO CONFIGURE YOUR BUILD!!!
[INFO] ==================================
[INFO] CMD: cl.exe /W4 /nologo /D_CRT_SECURE_NO_WARNINGS -I. -Ibuild/ -Isrc_build/ /Fe:build/nob_configed /Fo:build/nob_configed src_build/nob_configed.c
nob_configed.c
.\nob.h(2090): warning C4244: '=': conversion from '__int64' to 'size_t', possible loss of data
.\nob.h(2097): warning C4244: 'function': conversion from '__int64' to 'size_t', possible loss of data
[INFO] CMD: build/nob_configed
[INFO] CMD: cl.exe /W4 /nologo /D_CRT_SECURE_NO_WARNINGS -Ibuild/ -I. /Fe:build/main /Fo:build/main src/main.c
main.c

c:\path\to\nob.h\how_to\010_nob_two_stage
>build\main.exe
Hello, World

c:\path\to\nob.h\how_to\010_nob_two_stage
>
Dominant language
C++
Stars
3.3k
Forks
215
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from tsoding/nob.h

All issues in tsoding/nob.h

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.