Commit 4fba5822 authored by Leif Walsh's avatar Leif Walsh

fixed some valgrind sanity tests

parent 968b35a2
......@@ -88,9 +88,11 @@ PATENT RIGHTS GRANT:
#ident "Copyright (c) 2007-2013 Tokutek Inc. All rights reserved."
#ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it."
#include <stdio.h>
#include <stdlib.h>
int main(void) {
(void) malloc(42);
// GCC has gotten smart enough to optimize this away unless we use it.
printf("%p\n", malloc(42));
return 0;
}
......@@ -95,11 +95,11 @@ static void foo(int i) {
printf("%d\n", i);
}
int main(int argc, char *argv[]) {
int main(void) {
int arg;
int i;
for (i = 1; i < argc; i++) {
arg = atoi(argv[i]);
char *buf = (char *) &arg;
for (int i = 0; i < 2; i++) {
buf[i] = 'a';
}
foo(arg);
return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment