[libc-commits] [PATCH] D155121: [libc] Add support for the 'fread' function on the GPU

Siva Chandra via Phabricator via libc-commits libc-commits at lists.llvm.org
Fri Jul 14 11:02:01 PDT 2023


sivachandra added inline comments.


================
Comment at: libc/test/src/stdio/fopen_test.cpp:23
 
-  constexpr char another[] = "A simple string written to a file\n";
-  result = __llvm_libc::fputs(another, file);
+  constexpr char string[] = "A simple string written to a file\n";
+  result = __llvm_libc::fputs(string, file);
----------------
`UPPER_CASE`.


================
Comment at: libc/test/src/stdio/fopen_test.cpp:33
+  static char data[64] = {0};
+  ASSERT_EQ(__llvm_libc::fread(data, 1, sizeof(string) - 1, file),
+            sizeof(string) - 1);
----------------
Typo - `new_file`? Wonder how this is working at all because `file` is closed on line 27.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D155121/new/

https://reviews.llvm.org/D155121



More information about the libc-commits mailing list