CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
51 lines
1.3 KiB
C
51 lines
1.3 KiB
C
// RUN: %clang_analyze_cc1 \
|
|
// RUN: -analyzer-checker=core,unix.StdCLibraryFunctions,unix.Errno \
|
|
// RUN: -analyzer-config unix.StdCLibraryFunctions:ModelPOSIX=true \
|
|
// RUN: -verify %s
|
|
//
|
|
// expected-no-diagnostics
|
|
|
|
#include "Inputs/errno_var.h"
|
|
|
|
typedef __typeof__(sizeof(int)) size_t;
|
|
typedef struct {} FILE;
|
|
char *getcwd(char *buf, size_t size);
|
|
char *fgets(char *restrict s, int n, FILE *restrict stream);
|
|
char *mkdtemp(char *template);
|
|
|
|
int fputc(int c, FILE *stream);
|
|
#define EOF (-1)
|
|
|
|
void gh_175136(char *CharData, unsigned char *UCharData, size_t Size) {
|
|
if (!getcwd(CharData, Size)) {
|
|
if (errno == 2) {
|
|
return;
|
|
}
|
|
}
|
|
|
|
if (!getcwd((char*)UCharData, Size)) {
|
|
if (errno == 2) { // Previously there was a (false) warning from unix.Errno on this line
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
|
|
void fgets_test(unsigned char *Buf, size_t Size, FILE *F) {
|
|
if (!fgets((char *)Buf, Size, F))
|
|
if (errno == 1) // Similar case for the (false) warning
|
|
return;
|
|
}
|
|
|
|
void mkdtemp_test(unsigned char *Buf) {
|
|
if (!mkdtemp((char *)Buf))
|
|
if (errno == 1) // Similar case for the (false) warning
|
|
return;
|
|
}
|
|
|
|
void fputc_test(long long c, FILE *stream) {
|
|
if (fputc((int)c, stream) == EOF) {
|
|
if (errno == 1) // This case did not produce the false warning
|
|
return;
|
|
}
|
|
}
|